diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml index 31179af76..e18da4ae4 100644 --- a/.github/workflows/unit-tests.yaml +++ b/.github/workflows/unit-tests.yaml @@ -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 }} @@ -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/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index 7dd6f93f7..6de9eba5f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,13 @@ .tox build .idea/* -.coverage *.egg-info/ dist/* +# Code coverage artifacts +.coverage +coverage.xml + # Editors / IDEs .vscode/ diff --git a/README.md b/README.md index a92bd466b..5c790a497 100644 --- a/README.md +++ b/README.md @@ -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