Skip to content

Commit d77d5cd

Browse files
authored
Merge pull request #254 from LingMan/ci
Polish CI
2 parents 2f3fc27 + 682164a commit d77d5cd

File tree

2 files changed

+9
-20
lines changed

2 files changed

+9
-20
lines changed

.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[alias]
22
format = "fmt"
3-
format-check = "fmt -- --check"
4-
lint = "clippy --all-targets --all-features --examples --tests -- -D warnings"
3+
format-check = "fmt --check"
4+
lint = "clippy --all-targets --all-features -- -D warnings"
55
test-cover = "llvm-cov --all-features --lcov --output-path lcov.info"

.github/workflows/ci.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@ jobs:
3232
runs-on: ${{ matrix.os }}
3333
steps:
3434
- name: Install rust
35-
uses: actions-rs/toolchain@v1
35+
uses: dtolnay/rust-toolchain@master
3636
with:
37-
profile: minimal
3837
toolchain: ${{ matrix.rust }}
39-
target: ${{ matrix.target }}
40-
override: true
38+
targets: ${{ matrix.target }}
4139
- name: Checkout
4240
uses: actions/checkout@v3
4341
- name: Install linker
@@ -46,28 +44,19 @@ jobs:
4644
sudo apt-get update
4745
sudo apt-get install gcc-multilib
4846
- name: Test
49-
uses: actions-rs/cargo@v1
50-
with:
51-
command: test
52-
args: --all-features --target ${{ matrix.target }}
47+
run: cargo test --all-features --target ${{ matrix.target }}
48+
5349
lint:
5450
name: Linting (fmt + clippy)
5551
runs-on: ubuntu-latest
5652
steps:
5753
- name: Install rust
58-
uses: actions-rs/toolchain@v1
54+
uses: dtolnay/rust-toolchain@stable
5955
with:
60-
profile: minimal
61-
toolchain: 1.59.0
62-
override: true
6356
components: rustfmt, clippy
6457
- name: Checkout
6558
uses: actions/checkout@v3
6659
- name: Lint check
67-
uses: actions-rs/cargo@v1
68-
with:
69-
command: lint
60+
run: cargo lint
7061
- name: Format check
71-
uses: actions-rs/cargo@v1
72-
with:
73-
command: format-check
62+
run: cargo format-check

0 commit comments

Comments
 (0)