Skip to content

Upgrade pytest-cov

Upgrade pytest-cov #97

Workflow file for this run

name: tests
on: pull_request
jobs:
tests:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
with: # Use deploy key to ensure pushed change trigger checks as well : https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#workarounds-to-trigger-further-workflow-runs
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[test]
env:
GH_PAT: ${{ secrets.AUTH_TOKEN }}
- name: Test with pytest
timeout-minutes: 5
run: |
# Enable pipefail option, so if pytest fail, the job will fail as well
set -o pipefail
python -m pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered | tee pytest-coverage.txt
- name: Add coverage information to the PR
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml