Skip to content

Commit 68c01d2

Browse files
committed
switch report
1 parent 6987c7a commit 68c01d2

File tree

2 files changed

+40
-41
lines changed

2 files changed

+40
-41
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111
contents: read
1212
actions: read
1313
checks: write
14+
pull-requests: write
1415

1516
concurrency:
1617
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -56,39 +57,39 @@ jobs:
5657
egress-policy: audit
5758

5859
- name: Check out repo
59-
if: always()
60+
if: (!cancelled())
6061
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6162

6263
- name: Pull ccache cache
63-
if: always()
64+
if: (!cancelled())
6465
id: ccache-restore
6566
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6667
with:
6768
path: /home/runner/.cache/ccache
6869
key: ccache-${{ env.BUILD_IDENTIFIER }}
6970

7071
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
71-
if: always()
72+
if: (!cancelled())
7273
with:
7374
python-version: ${{ matrix.py-version }}
7475
cache: 'pip'
7576

7677
- name: Install Ubuntu packages
77-
if: always()
78+
if: (!cancelled())
7879
run: |
7980
sudo apt-get update
8081
sudo apt-get install -yq mpi-default-bin mpi-default-dev libmetis-dev libparmetis-dev libsuitesparse-dev ccache
8182
8283
- name: Get ccache config dir
83-
if: always()
84+
if: (!cancelled())
8485
run: ccache --show-config
8586

8687
- name: Install Python dependencies
87-
if: always()
88+
if: (!cancelled())
8889
run: make prereq && make prereq-extra
8990

9091
- name: Install
91-
if: always()
92+
if: (!cancelled())
9293
run: python -m pip list && make install PIP_INSTALL_FLAGS="--no-use-pep517 -vvv"
9394

9495
- name: Remove ccache cache
@@ -102,52 +103,42 @@ jobs:
102103
continue-on-error: true
103104

104105
- name: Push ccache cache
105-
if: always()
106+
if: (!cancelled())
106107
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
107108
with:
108109
path: /home/runner/.cache/ccache
109110
key: ccache-${{ env.BUILD_IDENTIFIER }}
110111

111112
- name: Ccache report
112-
if: always()
113+
if: (!cancelled())
113114
run: ccache -s
114115

115116
- name: Run tests
116-
if: always()
117+
if: (!cancelled())
117118
run: python3 -m pytest --junit-xml=test-results-${{ env.BUILD_IDENTIFIER }}.xml tests/
118119

119120
- name: Run flake8
120-
if: always()
121+
if: (!cancelled())
121122
run: |
122123
make flake8
123124
mv flake8.xml flake8-${{ env.BUILD_IDENTIFIER }}.xml
124125
125126
- name: Run cython-lint
126-
if: always()
127+
if: (!cancelled())
127128
run: |
128129
make cython-lint
129130
mv cython-lint.xml cython-lint-${{ env.BUILD_IDENTIFIER }}.xml
130131
131132
- name: Archive results
132133
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
133-
if: always()
134+
if: (!cancelled())
134135
with:
135136
name: Results (${{ env.BUILD_PRETTY_IDENTIFIER }})
136137
path: |
137138
test-results-${{ env.BUILD_IDENTIFIER }}.xml
138139
flake8-${{ env.BUILD_IDENTIFIER }}.xml
139140
cython-lint-${{ env.BUILD_IDENTIFIER }}.xml
140141
141-
- name: Report results
142-
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v1
143-
if: always()
144-
with:
145-
name: Report (${{ env.BUILD_PRETTY_IDENTIFIER }})
146-
path: |
147-
*-${{ env.BUILD_IDENTIFIER }}.xml
148-
reporter: java-junit
149-
fail-on-error: false
150-
151142
mac-ci:
152143

153144
strategy:
@@ -177,7 +168,7 @@ jobs:
177168
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
178169

179170
- name: Pull ccache cache
180-
if: always()
171+
if: (!cancelled())
181172
id: ccache-restore
182173
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
183174
with:
@@ -199,7 +190,7 @@ jobs:
199190
brew install brewsci-metis brewsci-parmetis brewsci-suite-sparse
200191
201192
- name: Get ccache config dir
202-
if: always()
193+
if: (!cancelled())
203194
run: ccache --show-config
204195

205196
- name: Augment path
@@ -224,48 +215,56 @@ jobs:
224215
continue-on-error: true
225216

226217
- name: Push ccache cache
227-
if: always()
218+
if: (!cancelled())
228219
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
229220
with:
230221
path: /Users/runner/Library/Caches/ccache
231222
key: ccache-${{ runner.os }}-${{ matrix.py-version }}
232223

233224
- name: Ccache report
234-
if: always()
225+
if: (!cancelled())
235226
run: ccache -s
236227

237228
- name: Run tests
238-
if: always()
229+
if: (!cancelled())
239230
run: python3 -m pytest --junit-xml=test-results-${{ runner.os }}-${{ matrix.py-version }}.xml tests/
240231

241232
- name: Run flake8
242-
if: always()
233+
if: (!cancelled())
243234
run: |
244235
make flake8
245236
mv flake8.xml flake8-${{ runner.os }}-${{ matrix.py-version }}.xml
246237
247238
- name: Run cython-lint
248-
if: always()
239+
if: (!cancelled())
249240
run: |
250241
make cython-lint
251242
mv cython-lint.xml cython-lint-${{ runner.os }}-${{ matrix.py-version }}.xml
252243
253244
- name: Archive results
254245
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
255-
if: always()
246+
if: (!cancelled())
256247
with:
257248
name: Results ${{ github.job }}
258249
path: |
259250
test-results-${{ runner.os }}-${{ matrix.py-version }}.xml
260251
flake8-${{ runner.os }}-${{ matrix.py-version }}.xml
261252
cython-lint-${{ runner.os }}-${{ matrix.py-version }}.xml
262253
263-
- name: Report results
264-
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v1
265-
if: always()
266-
with:
267-
name: Report (${{ github.job }})
268-
path: |
269-
*-${{ runner.os }}-${{ matrix.py-version }}.xml
270-
reporter: java-junit
271-
fail-on-error: false
254+
publish-test-results:
255+
name: "Publish Tests Results"
256+
needs: ["linux-ci", "mac-ci"]
257+
258+
runs-on: ubuntu-latest
259+
if: (!cancelled())
260+
261+
steps:
262+
- name: Download Artifacts
263+
uses: actions/download-artifact@v4
264+
with:
265+
path: artifacts
266+
267+
- name: Publish Test Results
268+
uses: EnricoMi/publish-unit-test-result-action@v2
269+
with:
270+
files: "*.xml"

.github/workflows/container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
echo "TEST_IMAGE_TAG=pr-${{ github.event.number }}" >> $GITHUB_ENV
4343
4444
- name: Check out
45-
if: always()
45+
if: (!cancelled())
4646
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4747
with:
4848
fetch-depth: 0

0 commit comments

Comments
 (0)