Skip to content

Commit b4cf200

Browse files
authored
Merge pull request #145 from shepmaster/ci-refurb
Refurbish GitHub Actions configuration
2 parents b54da02 + 43fcb5b commit b4cf200

File tree

1 file changed

+17
-50
lines changed

1 file changed

+17
-50
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
on:
2-
push:
3-
schedule:
4-
- cron: '21 1 * * FRI'
1+
on: [push, pull_request]
52

63
name: Continuous integration
74

@@ -14,33 +11,20 @@ jobs:
1411
- stable
1512

1613
steps:
17-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1815

19-
- uses: actions-rs/toolchain@v1
16+
- uses: dtolnay/rust-toolchain@master
2017
with:
21-
profile: minimal
2218
toolchain: ${{ matrix.rust }}
23-
override: true
2419
components: rustfmt, clippy
2520

26-
- uses: actions-rs/cargo@v1
27-
with:
28-
command: build
21+
- run: cargo build
2922

30-
- uses: actions-rs/cargo@v1
31-
with:
32-
command: test
23+
- run: cargo test
3324

34-
- uses: actions-rs/cargo@v1
35-
with:
36-
command: fmt
37-
args: --all -- --check
25+
- run: cargo fmt --all -- --check
3826

39-
- uses: actions-rs/cargo@v1
40-
with:
41-
command: clippy
42-
args: -- -D warnings
43-
continue-on-error: true # Currently not clean
27+
- run: cargo clippy -- -D warnings
4428

4529
secondary:
4630
runs-on: ubuntu-latest
@@ -52,34 +36,23 @@ jobs:
5236
- 1.31.0
5337

5438
steps:
55-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v4
5640

57-
- uses: actions-rs/toolchain@v1
41+
- uses: dtolnay/rust-toolchain@master
5842
with:
59-
profile: minimal
6043
toolchain: ${{ matrix.rust }}
61-
override: true
6244

63-
- uses: actions-rs/cargo@v1
64-
with:
65-
command: update
45+
- run: cargo update
6646

6747
# This is the version last compatible with 1.31
68-
- uses: actions-rs/cargo@v1
69-
with:
70-
command: update
71-
args: -p backtrace --precise 0.3.35
48+
- run: cargo update -p backtrace --precise 0.3.35
7249
if: matrix.rust == '1.31.0'
7350

74-
- uses: actions-rs/cargo@v1
75-
with:
76-
command: build
51+
- run: cargo build
7752

7853
# It's not worth making the tests run on 1.31 -- building the
7954
# code is enough.
80-
- uses: actions-rs/cargo@v1
81-
with:
82-
command: test
55+
- run: cargo test
8356
if: matrix.rust != '1.31.0'
8457

8558
windows:
@@ -90,18 +63,12 @@ jobs:
9063
- stable
9164

9265
steps:
93-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v4
9467

95-
- uses: actions-rs/toolchain@v1
68+
- uses: dtolnay/rust-toolchain@master
9669
with:
97-
profile: minimal
9870
toolchain: ${{ matrix.rust }}
99-
override: true
10071

101-
- uses: actions-rs/cargo@v1
102-
with:
103-
command: build
72+
- run: cargo build
10473

105-
- uses: actions-rs/cargo@v1
106-
with:
107-
command: test
74+
- run: cargo test

0 commit comments

Comments
 (0)