Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Show code coverage #754

Merged
merged 3 commits into from Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 25 additions & 6 deletions .github/workflows/unit-tests.yaml
Expand Up @@ -10,17 +10,15 @@ on:
branches: [ main ]

jobs:
build:

tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -48,4 +46,25 @@ jobs:

- name: Test with pytest
run: |
pytest Tests --cov --cov-report term-missing -vv
pytest Tests --cov --cov-report term-missing --cov-report xml -vv

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
package:
name: Build & verify package
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{env.PYTHON_LATEST}}

- run: python -m pip install build twine check-wheel-contents
- run: python -m build --sdist --wheel .
- run: ls -l dist
- run: check-wheel-contents dist/*.whl
- name: Check long_description
run: python -m twine check dist/*
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -4,10 +4,13 @@
.tox
build
.idea/*
.coverage
*.egg-info/
dist/*

# Code coverage artifacts
.coverage
coverage.xml

# Editors / IDEs
.vscode/

Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -2,6 +2,7 @@
[![Python Support](https://img.shields.io/pypi/pyversions/PyPDF2.svg)](https://pypi.org/project/PyPDF2/)
[![](https://img.shields.io/badge/-documentation-green)](https://pypdf2.readthedocs.io/en/latest/)
![GitHub last commit](https://img.shields.io/github/last-commit/py-pdf/PyPDF2)
[![codecov](https://codecov.io/gh/py-pdf/PyPDF2/branch/master/graph/badge.svg?token=id42cGNZ5Z)](https://codecov.io/gh/py-pdf/PyPDF2)

# PyPDF2

Expand Down