Skip to content

Commit 1f457d5

Browse files
committed
Try to make the CI status more robust
1 parent 9b4acd7 commit 1f457d5

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

Diff for: .github/workflows/ci.yaml

+9-6
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ jobs:
4343
components: rustfmt
4444
- run: cargo fmt --all --check
4545

46-
ci-status:
46+
ci-success:
4747
name: Complete
4848
runs-on: ubuntu-latest
4949
needs: [test, no_std, fmt]
50-
if: always()
5150
steps:
52-
- if: ${{ success() }}
53-
run: exit 0
54-
- if: ${{ !success() }}
55-
run: exit 1
51+
- run: exit 0
52+
ci-failed:
53+
name: Complete
54+
runs-on: ubuntu-latest
55+
needs: [test, no_std, fmt]
56+
if: failure()
57+
steps:
58+
- run: exit 1

Diff for: .github/workflows/pr.yaml

+9-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ jobs:
2828
components: rustfmt
2929
- run: cargo fmt --all --check
3030

31-
ci-status:
31+
ci-success:
3232
name: Complete
3333
runs-on: ubuntu-latest
3434
needs: [test, fmt]
35-
if: always()
3635
steps:
37-
- if: ${{ success() }}
38-
run: exit 0
39-
- if: ${{ !success() }}
40-
run: exit 1
36+
- run: exit 0
37+
ci-failed:
38+
name: Complete
39+
runs-on: ubuntu-latest
40+
needs: [test, fmt]
41+
if: failure()
42+
steps:
43+
- run: exit 1

0 commit comments

Comments
 (0)