Skip to content

Program show bug fix #496

Program show bug fix

Program show bug fix #496

Workflow file for this run

name: Coverage
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# See: https://github.com/pdm-project/pdm/issues/1879
env:
PDM_DEPS: 'urllib3<2'
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: pdm-project/setup-pdm@v4
name: Setup PDM
with:
python-version: 3.9 # Version range or exact version of a Python version to use, the same as actions/setup-python
# well we use virtualenv here
# prerelease: true # Allow prerelease versions to be installed
# enable-pep582: true # Enable PEP 582 package loading globally
- name: Install dependencies
run: pdm install # Then you can use pdm in the following steps.
- name: Test with pytest & generate coverage
run: |
pdm run coverage
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)