File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 44# All rights reserved.
55# https://github.com/btschwertfeger
66#
7- # Template workflow to run the unit tests of the package
7+ # Template workflow to run the unit tests of the package and upload the
8+ # coverage report of the ubuntu-latest/3.11 matrix cell to Codecov.
89#
910
1011name : Test Spot
1819 python-version :
1920 type : string
2021 required : true
22+ secrets :
23+ CODECOV_TOKEN :
24+ required : false
2125
2226permissions : read-all
2327
2428jobs :
2529 Test :
2630 name : Test ${{ inputs.os }} ${{ inputs.python-version }}
2731 runs-on : ${{ inputs.os }}
32+ env :
33+ OS : ${{ inputs.os }}
34+ PYTHON : ${{ inputs.python-version }}
2835 steps :
2936 - name : Checkout repository
3037 uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
4148 run : python -m pip install --user . -r requirements-dev.txt
4249
4350 - name : Run unit tests
44- run : pytest -vv --retries 1 -n auto tests
51+ run : pytest -vv --retries 1 -n auto --cov --cov-report=xml tests
52+
53+ - name : Upload coverage to Codecov
54+ if : |
55+ inputs.os == 'ubuntu-latest'
56+ && inputs.python-version == '3.11'
57+ && github.actor == 'btschwertfeger'
58+ && (github.event_name == 'push' || github.event_name == 'release')
59+ uses : codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
60+ with :
61+ token : ${{ secrets.CODECOV_TOKEN }}
62+ files : coverage.xml
63+ env_vars : OS,PYTHON
64+ fail_ci_if_error : true
65+ flags : unittests
66+ name : codecov-umbrella
67+ verbose : true
Original file line number Diff line number Diff line change 5757 os : ubuntu-latest
5858 python-version : " 3.11"
5959
60- # # Run the unit tests for Python 3.8 until 3.11
60+ # # Run the unit tests for Python 3.9 until 3.14 and upload the
61+ # # coverage statistics to codecov
6162 # #
6263 Test :
6364 needs : [Pre-Commit]
7172 with :
7273 os : ${{ matrix.os }}
7374 python-version : ${{ matrix.python-version }}
74-
75- # # Generates and uploads the coverage statistics to codecov
76- # #
77- CodeCov :
78- if : |
79- (success() && github.actor == 'btschwertfeger')
80- && (github.event_name == 'push' || github.event_name == 'release')
81- needs : [Pre-Commit]
82- uses : ./.github/workflows/_codecov.yaml
83- with :
84- os : ubuntu-latest
85- python-version : " 3.11"
86- secrets : inherit
75+ secrets :
76+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
8777
8878 # # Uploads the package to test.pypi.org on master if triggered by
8979 # # a regular commit/push.
You can’t perform that action at this time.
0 commit comments