@@ -2,39 +2,52 @@ name: CI
2
2
3
3
on :
4
4
push :
5
+ branches :
6
+ - master
7
+ - main
5
8
pull_request :
6
9
7
10
env :
8
11
# minimum supported rust version
9
12
MSRV : 1.46.0
10
13
11
14
jobs :
12
- backend :
13
- name : Backend
14
- runs-on : ubuntu-18.04
15
-
16
- env :
17
- CARGO_INCREMENTAL : 0
18
- RUSTFLAGS : " -C debuginfo=0 -D warnings"
19
-
15
+ check :
16
+ name : Check
17
+ runs-on : ubuntu-latest
20
18
steps :
21
19
- uses : actions/checkout@v2
20
+ - run : rustup override set ${{env.MSRV}}
21
+ -
uses :
Swatinem/[email protected]
22
+ - run : cargo check --workspace --all-targets
23
+ env :
24
+ RUSTFLAGS : " -D warnings"
22
25
23
- - name : Install Rust v${{ env.MSRV }}
24
- run : |
25
- rustup default ${{ env.MSRV }}
26
-
27
- - name : Install lint tools
28
- run : |
29
- rustup component add rustfmt
30
- rustup component add clippy
31
-
26
+ tests :
27
+ name : Tests
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - uses : actions/checkout@v2
31
+ - run : rustup override set ${{env.MSRV}}
32
32
-
uses :
Swatinem/[email protected]
33
+ - run : cargo test --workspace
33
34
34
- - name : Lint
35
- run : |
36
- cargo fmt -- --check
37
- cargo clippy --all-targets --all-features --all
35
+ fmt :
36
+ name : Rustfmt
37
+ runs-on : ubuntu-latest
38
+ steps :
39
+ - uses : actions/checkout@v2
40
+ - run : rustup override set ${{env.MSRV}}
41
+ - run : rustup component add rustfmt
42
+ -
uses :
Swatinem/[email protected]
43
+ - run : cargo fmt --all -- --check
38
44
39
- - name : Test
40
- run : cargo test
45
+ clippy :
46
+ name : Clippy
47
+ runs-on : ubuntu-latest
48
+ steps :
49
+ - uses : actions/checkout@v2
50
+ - run : rustup override set ${{env.MSRV}}
51
+ - run : rustup component add clippy
52
+ -
uses :
Swatinem/[email protected]
53
+ - run : cargo clippy --workspace -- --deny warnings
0 commit comments