Skip to content

Commit b4f2193

Browse files
committed
wip workflow
1 parent af546b5 commit b4f2193

2 files changed

Lines changed: 12 additions & 35 deletions

File tree

.github/workflows/rust.yml

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
pull_request:
77
paths:
88
- '.github/workflows/rust.yml'
9+
- 'rust-toolchain.toml'
910
- 'Cargo.toml'
1011
- 'Cargo.lock'
1112
- '**.rs'
@@ -15,6 +16,7 @@ on:
1516
- wip/next
1617
paths:
1718
- '.github/workflows/rust.yml'
19+
- 'rust-toolchain.toml'
1820
- 'Cargo.toml'
1921
- 'Cargo.lock'
2022
- '**.rs'
@@ -26,49 +28,32 @@ env:
2628
jobs:
2729

2830
test:
29-
name: ubuntu-${{ matrix.toolchain }}
31+
name: test
3032
runs-on: ubuntu-latest
3133

32-
strategy:
33-
matrix:
34-
toolchain: [stable, beta, nightly]
35-
3634
steps:
3735

3836
- name: checkout
3937
uses: actions/checkout@v5
4038

4139
- name: set up rust toolchain
42-
uses: actions-rs/toolchain@v1
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
4341
with:
44-
profile: minimal
45-
toolchain: ${{ matrix.toolchain }}
46-
components: clippy, rustfmt
42+
rustflags: ''
43+
44+
- name: check formatting
45+
run: cargo fmt --check
4746

4847
- name: cargo check
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: check
48+
run: cargo check
5249

5350
- name: cargo clippy
54-
uses: actions-rs/cargo@v1
55-
with:
56-
command: clippy
57-
58-
- name: check formatting
59-
uses: actions-rs/cargo@v1
60-
with:
61-
command: fmt
62-
args: -- --check
51+
run: cargo clippy
6352

6453
- name: cargo build
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: build
54+
run: cargo build
6855

6956
- name: cargo test
70-
uses: actions-rs/cargo@v1
71-
with:
72-
command: test
57+
run: cargo test
7358

7459
...

rust-toolchain.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
[toolchain]
22
channel = "1.90"
3-
components = [
4-
"rustc",
5-
"cargo",
6-
"rust-std",
7-
"rustfmt",
8-
"rust-analyzer",
9-
"clippy",
10-
]
113
profile = "minimal"

0 commit comments

Comments
 (0)