Skip to content

Commit d29ff67

Browse files
committed
ci: Try fixing unit test reports in ci.yml
1 parent 5d5e189 commit d29ff67

1 file changed

Lines changed: 31 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ jobs:
1313
name: 'Core / Unit Test Pipeline'
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 20
16-
permissions:
17-
# For publishing results
18-
checks: write
1916

2017
# Run this test for different Python versions
2118
strategy:
@@ -53,21 +50,44 @@ jobs:
5350
run: |
5451
make unit_test
5552
-
56-
name: Publish Test Results
57-
uses: EnricoMi/publish-unit-test-result-action@v2
58-
if: always()
53+
name: Upload Test Reports
54+
if: (!cancelled())
55+
uses: actions/upload-artifact@v6
5956
with:
60-
junit_files: tests_xml/tests.xml
61-
check_name: "Core / Unit Test Results (${{ matrix.python-version }})"
62-
comment_mode: "off"
57+
name: test-results-python-${{ matrix.python-version }}
58+
path: tests_xml/tests.xml
6359
-
6460
name: Upload Coverage Reports
65-
if: always()
66-
uses: actions/upload-artifact@v4
61+
if: (!cancelled())
62+
uses: actions/upload-artifact@v6
6763
with:
6864
name: coverage-report-core-unittests-py${{ matrix.python-version }}
6965
path: coverage/
7066

67+
publish-test-results:
68+
name: "Tests Results"
69+
needs: build-and-test
70+
runs-on: ubuntu-latest
71+
permissions:
72+
# For publishing results
73+
checks: write
74+
75+
if: (!cancelled())
76+
steps:
77+
-
78+
name: Download Artifacts
79+
uses: actions/download-artifact@v7
80+
with:
81+
path: artifacts
82+
pattern: test-results-python-*
83+
-
84+
name: Publish Test Results
85+
uses: EnricoMi/publish-unit-test-result-action@v2
86+
with:
87+
junit_files: artifacts/**/*.xml
88+
check_name: "Core / Unit Test"
89+
comment_mode: "off"
90+
7191
test-petals:
7292
name: Petals Compatibility
7393
uses: CLIMADA-project/climada_petals/.github/workflows/testing.yml@develop

0 commit comments

Comments
 (0)