Skip to content

Commit 60c6383

Browse files
authored
refactor(ci): small refactoring (#113)
* chore(ci): use dtolnay/rust-toolchain action to setup rust consistently * refactor(ci): remove redundant job name * refactor(ci): remove unnecessary hyphen from rustfmt command
1 parent 23212f1 commit 60c6383

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/CI.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ on:
77

88
jobs:
99
style:
10-
name: Check Style
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v4
14-
- name: Install Rustfmt
15-
run: rustup component add rustfmt
13+
- uses: dtolnay/rust-toolchain@stable
14+
with:
15+
components: rustfmt
1616
- name: Check formatting
17-
run: cargo fmt --all -- --check
17+
run: cargo fmt --all --check
1818

1919
test:
20-
name: Test
2120
needs: [style]
2221
runs-on: ubuntu-latest
2322
strategy:
@@ -27,8 +26,9 @@ jobs:
2726
- beta
2827
steps:
2928
- uses: actions/checkout@v4
30-
- name: Install Rust
31-
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
29+
- uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ matrix.rust }}
3232
- name: Run tests
3333
run: cargo test --workspace
3434

0 commit comments

Comments
 (0)