Skip to content

Commit

Permalink
DEV: Show code coverage (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinThoma committed Apr 15, 2022
1 parent 0500c8d commit 01a1242
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
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

0 comments on commit 01a1242

Please sign in to comment.