Skip to content

Commit d946e96

Browse files
authored
Merge pull request #60 from cuviper/ci-merge
Try to make the CI status more robust
2 parents 9b4acd7 + f43ba21 commit d946e96

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

Diff for: .github/workflows/ci.yaml

+10-7
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,22 @@ jobs:
3737
name: Format
3838
runs-on: ubuntu-latest
3939
steps:
40-
- uses: actions/checkout@v5
40+
- uses: actions/checkout@v4
4141
- uses: dtolnay/[email protected]
4242
with:
4343
components: rustfmt
4444
- run: cargo fmt --all --check
4545

46-
ci-status:
46+
ci-success:
47+
name: Complete
48+
runs-on: ubuntu-latest
49+
needs: [test, no_std, fmt]
50+
steps:
51+
- run: exit 0
52+
ci-failed:
4753
name: Complete
4854
runs-on: ubuntu-latest
4955
needs: [test, no_std, fmt]
50-
if: always()
56+
if: failure()
5157
steps:
52-
- if: ${{ success() }}
53-
run: exit 0
54-
- if: ${{ !success() }}
55-
run: exit 1
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)