Skip to content

Commit 39cec17

Browse files
authored
Merge pull request #74 from cuviper/ci-actions
Update and simplify the CI workflow
2 parents d6f088e + c717bbc commit 39cec17

File tree

1 file changed

+10
-34
lines changed

1 file changed

+10
-34
lines changed

.github/workflows/ci.yml

+10-34
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v2
26+
uses: actions/checkout@v3
2727

2828
- name: Set up Rust
29-
uses: actions-rs/toolchain@v1
29+
uses: dtolnay/rust-toolchain@master
3030
with:
31-
profile: minimal
3231
toolchain: ${{ matrix.rust }}
33-
override: true
3432

3533
- name: (1.31.0) Downgrade serde_json
3634
if: ${{ matrix.rust == '1.31.0' }}
@@ -39,53 +37,31 @@ jobs:
3937
cargo update -p serde_json --precise 1.0.39
4038
4139
- name: Build (no_std)
42-
uses: actions-rs/cargo@v1
43-
with:
44-
command: build
45-
args: --no-default-features
40+
run: cargo build --no-default-features
4641

4742
- name: Build
48-
uses: actions-rs/cargo@v1
49-
with:
50-
command: build
51-
args: --features "${{ matrix.features }}"
43+
run: cargo build --features "${{ matrix.features }}"
5244

5345
- name: Test
54-
uses: actions-rs/cargo@v1
55-
with:
56-
command: test
57-
args: --features "${{ matrix.features }}"
46+
run: cargo test --features "${{ matrix.features }}"
5847

5948
- name: Doc
60-
uses: actions-rs/cargo@v1
61-
with:
62-
command: doc
63-
args: --features "${{ matrix.features }}"
49+
run: cargo doc --features "${{ matrix.features }}"
6450

6551
clippy:
6652
name: Rustfmt and Clippy
6753
runs-on: ubuntu-latest
6854
steps:
6955
- name: Checkout
70-
uses: actions/checkout@v2
56+
uses: actions/checkout@v3
7157

7258
- name: Set up nightly Rust
73-
uses: actions-rs/toolchain@v1
59+
uses: dtolnay/rust-toolchain@nightly
7460
with:
75-
profile: minimal
76-
toolchain: nightly
77-
override: true
7861
components: rustfmt, clippy
7962

8063
- name: Rustfmt
81-
uses: actions-rs/cargo@v1
82-
with:
83-
command: fmt
84-
args: --all -- --check
64+
run: cargo fmt --all -- --check
8565

8666
- name: Clippy
87-
uses: actions-rs/cargo@v1
88-
with:
89-
command: clippy
90-
# args: -- -D warnings
91-
args: --
67+
run: cargo clippy # -- -D warnings

0 commit comments

Comments
 (0)