-
Notifications
You must be signed in to change notification settings - Fork 18
57 lines (48 loc) · 1.32 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test-and-lint:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
# - beta
# - nightly
# keep this fixed to the version in rust-toolchain.toml, README.md and below
- nightly-2022-11-03
# - 1.31.0 # find out MSRV
steps:
- uses: actions/checkout@v3
- name: Update toolchain
run: |
rustup default ${{ matrix.toolchain }}
rustup override set ${{ matrix.toolchain }}
rustup component add clippy
- name: Show toolchain info
run: |
cargo --version --verbose
rustc --version
cargo clippy --version
- name: Lint stable
if: ${{ matrix.toolchain == 'stable' }}
run: |
cargo clippy --workspace -- -D warnings
- name: Lint nightly
if: ${{ matrix.toolchain == 'nightly-2022-11-03' }}
run: |
cargo clippy --workspace --features nightly -- -D warnings
- name: Test stable
if: ${{ matrix.toolchain == 'stable' }}
run: |
cargo test --workspace
- name: Test nightly
if: ${{ matrix.toolchain == 'nightly-2022-11-03' }}
run: |
cargo test --workspace --features nightly