File tree 1 file changed +47
-0
lines changed
1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Rust CI/CD
2
+
3
+ on :
4
+ push :
5
+ branches : ["main"]
6
+ pull_request :
7
+ branches : ["main"]
8
+
9
+ env :
10
+ CARGO_TERM_COLOR : always
11
+
12
+ jobs :
13
+ build :
14
+ strategy :
15
+ fail-fast : false
16
+ matrix :
17
+ os : [ubuntu-latest, windows-latest, macos-latest]
18
+ runs-on : ${{ matrix.os }}
19
+ steps :
20
+ - uses : actions/checkout@v3
21
+
22
+ - name : Install
23
+ if : ${{ matrix.os == 'ubuntu-latest' }}
24
+ run : |
25
+ cargo install cargo-tarpaulin
26
+
27
+ - name : Test
28
+ run : |
29
+ cargo clippy
30
+ cargo test
31
+
32
+ - name : Build
33
+ run : |
34
+ cargo build
35
+ cargo build --release
36
+
37
+ - name : Generate Coverage Report
38
+ if : ${{ matrix.os == 'ubuntu-latest' }}
39
+ run : |
40
+ cargo tarpaulin --engine llvm --out xml --output-dir target
41
+
42
+ - name : Upload coverage reports to Codecov
43
+ if : ${{ matrix.os == 'ubuntu-latest' }}
44
+
45
+ with :
46
+ token : ${{ secrets.CODECOV_TOKEN }}
47
+ files : target/cobertura.xml
You can’t perform that action at this time.
0 commit comments