File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test-and-upload-coverage
2
+
3
+ on :
4
+ pull_request :
5
+ branches : [ master ]
6
+
7
+ jobs :
8
+
9
+ cancel :
10
+ name : Cancel Previous Runs
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : cancel running workflows
14
+ uses : everphone-gmbh/cancel-previous-workflows@v5
15
+ env :
16
+ GITHUB_TOKEN : ${{ github.token }}
17
+
18
+ coverage :
19
+ runs-on : ubuntu-latest
20
+ strategy :
21
+ matrix :
22
+ redis-version : [4, 5]
23
+ steps :
24
+ - uses : actions/checkout@v2
25
+ - name : Cache cargo bin
26
+ uses : actions/cache@v2
27
+ with :
28
+ path : |
29
+ ~/.cargo/registry
30
+ ~/.cargo/git
31
+ target
32
+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
33
+ - uses : actions-rs/toolchain@v1
34
+ with :
35
+ toolchain : nightly
36
+ override : true
37
+ - name : Run cargo-tarpaulin
38
+ uses :
actions-rs/[email protected]
39
+ with :
40
+ args : ' -t 640'
41
+ out-type : Lcov
42
+
43
+ with :
44
+ github-token : ${{ secrets.GITHUB_TOKEN }}
45
+ lcov-file : ./lcov.info
46
+ - name : Archive code coverage results
47
+ uses : actions/upload-artifact@v1
48
+ with :
49
+ name : code-coverage-report
50
+ path : lcov.info
You can’t perform that action at this time.
0 commit comments