@@ -49,65 +49,11 @@ jobs:
49
49
# with:
50
50
# sarif_file: trivy-results.sarif
51
51
52
- llvm-cov :
53
- name : llvm-cov
54
- runs-on : ubuntu-latest
55
- steps :
56
- - name : Checkout repository
57
- uses : actions/checkout@v4
58
-
59
- - name : Install dependencies
60
- run : |
61
- sudo apt update
62
- sudo apt install -y libssl-dev pkg-config clang llvm pkg-config nettle-dev
63
-
64
- # Set up Rust
65
- - name : Set up Rust
66
- uses : actions-rs/toolchain@v1
67
- with :
68
- profile : minimal
69
- toolchain : nightly
70
- override : true
71
-
72
- - name : Install cargo-llvm-cov
73
- uses : taiki-e/install-action@cargo-llvm-cov
74
-
75
-
76
- - name : Install Clippy
77
- run : rustup component add clippy
78
-
79
- # Cache Cargo dependencies
80
- - name : Cache Cargo registry
81
- uses : actions/cache@v3
82
- with :
83
- path : ~/.cargo/registry
84
- key : ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
85
- restore-keys : |
86
- ${{ runner.os }}-cargo-registry-
87
-
88
- - name : Cache Cargo index
89
- uses : actions/cache@v3
90
- with :
91
- path : ~/.cargo/git
92
- key : ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
93
- restore-keys : |
94
- ${{ runner.os }}-cargo-index-
95
-
96
- - name : Cache target directory
97
- uses : actions/cache@v3
98
- with :
99
- path : target
100
- key : ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
101
- restore-keys : |
102
- ${{ runner.os }}-cargo-target-
103
52
104
- - name : Generate code coverage
105
- run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
106
-
107
-
108
- codeql :
109
- name : SonarQube
53
+ coverage :
54
+ name : Code Coverage
110
55
runs-on : ubuntu-latest
56
+
111
57
steps :
112
58
- name : Checkout repository
113
59
uses : actions/checkout@v4
@@ -117,21 +63,15 @@ jobs:
117
63
sudo apt update
118
64
sudo apt install -y libssl-dev pkg-config clang llvm pkg-config nettle-dev
119
65
120
- # Set up Rust
121
66
- name : Set up Rust
122
67
uses : actions-rs/toolchain@v1
123
68
with :
124
- profile : minimal
125
69
toolchain : nightly
126
70
override : true
127
71
128
- - name : Install cargo-llvm-cov
129
- uses : taiki-e/ install-action@ cargo-llvm-cov
72
+ - name : Install tarpaulin
73
+ run : cargo install cargo-tarpaulin
130
74
131
- - name : Install Clippy
132
- run : rustup component add clippy
133
-
134
- # Cache Cargo dependencies
135
75
- name : Cache Cargo registry
136
76
uses : actions/cache@v3
137
77
with :
@@ -156,17 +96,13 @@ jobs:
156
96
restore-keys : |
157
97
${{ runner.os }}-cargo-target-
158
98
159
- - name : Generate code coverage
160
- run : cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
161
-
162
- - name : Install cargo-sonar and run Clippy
99
+ - name : Run code coverage
163
100
run : |
164
- cargo install cargo-sonar
165
- cargo clippy --message-format json > my-clippy-report.json
166
- cargo sonar --clippy-path my-clippy-report.json
101
+ cargo tarpaulin --out Xml --timeout 240
167
102
168
- - name : SonarQube Scan
169
- uses : SonarSource/sonarqube-scan-action@v4
170
- env :
171
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
172
- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
103
+ # - name: Upload coverage to Codecov
104
+ # uses: codecov/codecov-action@v3
105
+ # with:
106
+ # files: target/tarpaulin/coverage.xml
107
+ # fail_ci_if_error: true
108
+ # verbose: true
0 commit comments