Skip to content

Commit 6f96103

Browse files
authored
chore(ci): update ci config (#27)
* chore(ci): update ci config * chore(ci): remove redundant ci job step name
1 parent 0121482 commit 6f96103

File tree

1 file changed

+22
-64
lines changed

1 file changed

+22
-64
lines changed

.github/workflows/CI.yml

Lines changed: 22 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,13 @@ jobs:
2626
name: Check Style
2727
runs-on: ubuntu-latest
2828
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v1
29+
- uses: actions/checkout@v3
3130

32-
- name: Install Rust
33-
uses: actions-rs/toolchain@v1
31+
- uses: dtolnay/rust-toolchain@stable
3432
with:
35-
profile: minimal
36-
toolchain: stable
37-
override: true
3833
components: rustfmt
3934

40-
- name: cargo fmt --check
41-
uses: actions-rs/cargo@v1
42-
with:
43-
command: fmt
44-
args: --all -- --check
35+
- run: cargo fmt --all --check
4536

4637
test:
4738
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
@@ -61,20 +52,14 @@ jobs:
6152
runs-on: ${{ matrix.os }}
6253

6354
steps:
64-
- name: Checkout
65-
uses: actions/checkout@v1
55+
- uses: actions/checkout@v3
6656

6757
- name: Install Rust (${{ matrix.rust }})
68-
uses: actions-rs/toolchain@v1
58+
uses: dtolnay/rust-toolchain@master
6959
with:
70-
profile: minimal
7160
toolchain: ${{ matrix.rust }}
72-
override: true
7361

74-
- name: Test
75-
uses: actions-rs/cargo@v1
76-
with:
77-
command: test
62+
- run: cargo test
7863

7964
msrv:
8065
name: Check MSRV (${{ matrix.rust }})
@@ -90,80 +75,53 @@ jobs:
9075
runs-on: ${{ matrix.os }}
9176

9277
steps:
93-
- name: Checkout
94-
uses: actions/checkout@v1
78+
- uses: actions/checkout@v3
9579

9680
- name: Install Rust (${{ matrix.rust }})
97-
uses: actions-rs/toolchain@v1
81+
uses: dtolnay/rust-toolchain@master
9882
with:
99-
profile: minimal
10083
toolchain: ${{ matrix.rust }}
101-
override: true
10284

103-
- name: Check
104-
uses: actions-rs/cargo@v1
105-
with:
106-
command: check
85+
- run: cargo check
10786

10887
miri:
10988
name: Test with Miri
11089
needs: [style]
11190
runs-on: ubuntu-latest
11291

11392
steps:
114-
- name: Checkout
115-
uses: actions/checkout@v1
93+
- uses: actions/checkout@v3
11694

117-
- name: Install Rust
118-
uses: actions-rs/toolchain@v1
95+
- uses: dtolnay/rust-toolchain@nightly
11996
with:
120-
profile: minimal
121-
toolchain: nightly
12297
components: miri
123-
override: true
12498

12599
- name: Test
126-
# Can't enable tcp feature since Miri does not support the tokio runtime
127-
run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test
100+
env:
101+
# Can't enable tcp feature since Miri does not support the tokio runtime
102+
MIRIFLAGS: "-Zmiri-disable-isolation"
103+
run: cargo miri test
128104

129105
features:
130106
name: features
131107
needs: [style]
132108
runs-on: ubuntu-latest
133109
steps:
134-
- name: Checkout
135-
uses: actions/checkout@v1
110+
- uses: actions/checkout@v3
136111

137-
- name: Install Rust
138-
uses: actions-rs/toolchain@v1
139-
with:
140-
profile: minimal
141-
toolchain: nightly
142-
override: true
112+
- uses: dtolnay/rust-toolchain@nightly
143113

144-
- name: Install cargo-hack
145-
run: cargo install cargo-hack
114+
- uses: taiki-e/install-action@cargo-hack
146115

147-
- name: check --feature-powerset
148-
run: cargo hack check --feature-powerset --depth 2 -Z avoid-dev-deps
116+
- run: cargo hack check --feature-powerset --depth 2 -Z avoid-dev-deps
149117

150118
doc:
151119
name: Build docs
152120
needs: [style, test]
153121
runs-on: ubuntu-latest
154122
steps:
155-
- name: Checkout
156-
uses: actions/checkout@v1
123+
- uses: actions/checkout@v3
157124

158-
- name: Install Rust
159-
uses: actions-rs/toolchain@v1
160-
with:
161-
profile: minimal
162-
toolchain: nightly
163-
override: true
125+
- uses: dtolnay/rust-toolchain@nightly
164126

165-
- name: cargo doc
166-
uses: actions-rs/cargo@v1
167-
with:
168-
command: rustdoc
169-
args: -- --cfg docsrs -D broken-intra-doc-links
127+
- run: cargo rustdoc -- --cfg docsrs -D broken-intra-doc-links

0 commit comments

Comments
 (0)