File tree Expand file tree Collapse file tree 1 file changed +52
-8
lines changed Expand file tree Collapse file tree 1 file changed +52
-8
lines changed Original file line number Diff line number Diff line change 1
1
name : Rust
2
2
3
- on : [push, pull_request]
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+ pull_request :
7
+ branches : ["main"]
4
8
5
9
env :
6
10
CARGO_TERM_COLOR : always
7
11
8
12
jobs :
9
- build :
13
+ lint :
10
14
runs-on : ubuntu-latest
11
15
steps :
12
16
- uses : actions/checkout@v3
13
17
- name : Check formatting
14
18
run : cargo fmt -- --check
19
+ - name : Run clippy
20
+ run : cargo clippy
21
+
22
+ build :
23
+ runs-on : ubuntu-latest
24
+ needs : lint
25
+ strategy :
26
+ matrix :
27
+ rust :
28
+ - 1.85.0
29
+ - stable
30
+ - beta
31
+ - nightly
32
+ features :
33
+ - " "
34
+ - " --no-default-features"
35
+
36
+ steps :
37
+ - name : Install rust (${{ matrix.rust }})
38
+ uses : actions-rs/toolchain@v1
39
+ with :
40
+ toolchain : ${{ matrix.rust }}
41
+ profile : minimal
42
+ override : true
43
+ - uses : actions/checkout@v3
15
44
- name : Build
16
45
run : cargo build --verbose
17
46
- name : Run tests
18
47
run : cargo test --verbose
19
48
- name : Run examples
20
49
working-directory : ./epserde
21
50
run : for example in examples/*.rs ; do cargo run --example "$(basename "${example%.rs}")" ; done
22
- - name : Run clippy
23
- run : cargo clippy # -- -Dclippy::all -Dclippy::cargo
24
- - name : Switch to nightly toolchain
25
- run : rustup default nightly
26
- - name : Test with miri
27
- run : MIRIFLAGS="-Zmiri-disable-isolation" cargo test
51
+
52
+ coverage :
53
+ needs : build
54
+ name : coverage
55
+ runs-on : ubuntu-latest
56
+ container :
57
+ image : xd009642/tarpaulin:develop-nightly
58
+ options : --security-opt seccomp=unconfined
59
+ steps :
60
+ - name : Checkout repository
61
+ uses : actions/checkout@v2
62
+
63
+ - name : Generate code coverage
64
+ run : |
65
+ cargo +nightly tarpaulin --verbose --engine llvm --all-features --workspace --out Lcov
66
+
67
+ - name : Coveralls
68
+ uses : coverallsapp/github-action@v2
69
+ with :
70
+ github-token : ${{ secrets.GITHUB_TOKEN }}
71
+ path-to-lcov : " lcov.info"
You can’t perform that action at this time.
0 commit comments