done Merge branch 'pk' #316
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
branches: [ main, ] | |
pull_request: | |
branches: [ main, ] | |
workflow_dispatch: | |
jobs: | |
code-coverage: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Setup Python | |
- name: Setup Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
# Setup Poetry | |
# https://github.com/abatilo/actions-poetry | |
- name: Setup Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: "1.2.0" | |
- name: Install dependencies with test/coverage dependencies | |
run: poetry install --with test --no-root | |
- name: Test with PyTest and get coverage report | |
run: poetry run invoke pytest-cov | |
# know more at https://github.com/codecov/codecov-action | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
# files: ./coverage1.xml,./coverage2.xml # optional | |
# flags: unittests # optional | |
name: codecov_report | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |