File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 description : ' The base SHA of the PR'
4040 required : true
4141 type : string
42+ secrets :
43+ CODECOV_TOKEN :
44+ required : true
4245
4346# We only support ubuntu, so bash is the default
4447defaults :
@@ -109,6 +112,10 @@ jobs:
109112 - python-version : " 3.12"
110113 container : ${{ inputs.py_12_container }}
111114
115+ env :
116+ CI_PYTHON_VERSION : ${{ matrix.python-version }}
117+ CI_ARCH : ${{ matrix.arch }}
118+
112119 steps :
113120 - name : Checkout
114121 uses : actions/checkout@v4
@@ -127,9 +134,20 @@ jobs:
127134 if : ${{ always() }}
128135 with :
129136 name : " test-results-${{ matrix.arch }}-py${{ matrix.python-version }}"
130- path : " ${{ github.workspace }}/tmp/*.xml"
137+ path : " ${{ github.workspace }}/tmp/reports/ *.xml"
131138 if-no-files-found : error
132-
139+ - name : Upload coverage to Codecov
140+ uses : codecov/codecov-action@v5
141+ # Upload test results even if the tests fail
142+ if : ${{ always() }}
143+ with :
144+ directory : " ${{ github.workspace }}/tmp/reports"
145+ env_vars : CI_ARCH,CI_PYTHON_VERSION
146+ fail_ci_if_error : true
147+ flags : unittests
148+ name : nat-code-cov-${{ matrix.arch }}-py${{ matrix.python-version }}
149+ token : ${{ secrets.CODECOV_TOKEN }}
150+ verbose : true
133151
134152 documentation :
135153 name : Documentation
Original file line number Diff line number Diff line change 1919GITHUB_SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd ) "
2020
2121source ${GITHUB_SCRIPT_DIR} /common.sh
22+ export REPORTS_DIR=${WORKSPACE_TMP} /reports
2223get_lfs_files
2324
2425create_env group:dev extra:all
@@ -27,9 +28,10 @@ rapids-logger "Git Version: $(git describe)"
2728rapids-logger " Running tests with Python version $( python --version) and pytest version $( pytest --version) on $( arch) "
2829set +e
2930
30- pytest --junit-xml=${WORKSPACE_TMP} /report_pytest.xml \
31+ REPORT_IDENT_SLUG=" $( arch) -py${PYTHON_VERSION} "
32+ pytest --junit-xml=${REPORTS_DIR} /report-${REPORT_IDENT_SLUG} _pytest.xml \
3133 --cov=nat --cov-report term-missing \
32- --cov-report=xml:${WORKSPACE_TMP} /report_pytest_coverage .xml
34+ --cov-report=xml:${REPORTS_DIR} /report- ${REPORT_IDENT_SLUG} _pytest_coverage .xml
3335PYTEST_RESULTS=$?
3436
3537exit ${PYTEST_RESULTS}
You can’t perform that action at this time.
0 commit comments