Skip to content

Commit 76de717

Browse files
committed
wip workflow
1 parent af546b5 commit 76de717

1 file changed

Lines changed: 11 additions & 28 deletions

File tree

.github/workflows/rust.yml

Lines changed: 11 additions & 28 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,30 @@ 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
43-
with:
44-
profile: minimal
45-
toolchain: ${{ matrix.toolchain }}
46-
components: clippy, rustfmt
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
41+
42+
- name: check formatting
43+
run: cargo fmt --check
4744

4845
- name: cargo check
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: check
46+
run: cargo check
5247

5348
- 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
49+
run: cargo clippy
6350

6451
- name: cargo build
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: build
52+
run: cargo build
6853

6954
- name: cargo test
70-
uses: actions-rs/cargo@v1
71-
with:
72-
command: test
55+
run: cargo test
7356

7457
...

0 commit comments

Comments
 (0)