11---
2- name : Codecov Coverage Report
2+ name : " Codecov Coverage Report"
33
4- on : # yamllint disable-line rule:truthy
5- push :
6- branches : [ main ]
7- pull_request :
8- branches : [ main ]
4+ on : # yamllint disable-line rule:truthy
5+ # Makes it reusable; called by other workflows
6+ workflow_call :
7+ secrets :
8+ CODECOV_TOKEN :
9+ description : " CODECOV Auth Token"
10+ required : true
911
1012jobs :
1113 run :
@@ -15,27 +17,28 @@ jobs:
1517 timeout-minutes : 10
1618 strategy :
1719 matrix :
18- os : [ubuntu-latest]
20+ os : [" ubuntu-latest" ]
1921 python-version : ["3.12"]
2022 steps :
21- - uses : actions/checkout@main
22- - name : Setup Python
23- uses : actions/setup-python@main
23+ - uses : " actions/checkout@main"
24+ - name : " Setup Python"
25+ uses : " actions/setup-python@main"
2426 with :
2527 python-version : ${{ matrix.python-version }}
2628 - name : " Cache PIP Dependencies"
2729 uses : " actions/cache@v4"
2830 with :
2931 path : ~/.cache/pip
30- key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
32+ key : |
33+ ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
3134 restore-keys : |
3235 ${{ runner.os }}-pip-${{ matrix.python-version }}-
3336 ${{ runner.os }}-pip-
34- - name : Install prerequisites
37+ - name : " Install prerequisites"
3538 run : |
3639 python -m pip install --upgrade pip setuptools wheel
3740 pip install -r requirements.txt
38- - name : Install pytest, pytest-cov
41+ - name : " Install pytest, pytest-cov"
3942 run : |
4043 pip install pytest
4144 pip install pytest-cov
@@ -44,12 +47,12 @@ jobs:
4447 run : |
4548 python -c "import os; print(os.getcwd())"
4649 python -m pytest . --ignore=solutions --log-cli-level=INFO -v --cov-report term-missing --cov --cov-branch --cov-report=xml
47- - name : List test files
50+ - name : " List test files"
4851 run : |
4952 ls *.xml
5053 # yamllint enable rule:line-length
51- - name : Upload coverage to Codecov
52- uses : codecov/codecov-action@v5.5.1
54+ - name : " Upload coverage to Codecov"
55+ uses : " codecov/codecov-action@v5.5.1"
5356 with :
5457 token : ${{ secrets.CODECOV_TOKEN }}
5558 files : coverage.xml
0 commit comments