|
49 | 49 | # with:
|
50 | 50 | # sarif_file: trivy-results.sarif
|
51 | 51 |
|
| 52 | + llvm-cov: |
| 53 | + name: RustAnalize |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - name: Checkout repository |
| 57 | + uses: actions/checkout@v4 |
| 58 | + |
| 59 | + # Set up Rust |
| 60 | + - name: Set up Rust |
| 61 | + uses: actions-rs/toolchain@v1 |
| 62 | + with: |
| 63 | + profile: minimal |
| 64 | + toolchain: nightly |
| 65 | + override: true |
| 66 | + |
| 67 | + - name: Install cargo-llvm-cov |
| 68 | + uses: taiki-e/install-action@cargo-llvm-cov |
| 69 | + |
| 70 | + - name: Install Clippy |
| 71 | + run: rustup component add clippy |
| 72 | + |
| 73 | + # Cache Cargo dependencies |
| 74 | + - name: Cache Cargo registry |
| 75 | + uses: actions/cache@v3 |
| 76 | + with: |
| 77 | + path: ~/.cargo/registry |
| 78 | + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
| 79 | + restore-keys: | |
| 80 | + ${{ runner.os }}-cargo-registry- |
| 81 | +
|
| 82 | + - name: Cache Cargo index |
| 83 | + uses: actions/cache@v3 |
| 84 | + with: |
| 85 | + path: ~/.cargo/git |
| 86 | + key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
| 87 | + restore-keys: | |
| 88 | + ${{ runner.os }}-cargo-index- |
| 89 | +
|
| 90 | + - name: Cache target directory |
| 91 | + uses: actions/cache@v3 |
| 92 | + with: |
| 93 | + path: target |
| 94 | + key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} |
| 95 | + restore-keys: | |
| 96 | + ${{ runner.os }}-cargo-target- |
| 97 | +
|
| 98 | + - name: Generate code coverage |
| 99 | + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info |
| 100 | + |
| 101 | + |
52 | 102 | codeql:
|
53 | 103 | name: RustAnalize
|
54 | 104 | runs-on: ubuntu-latest
|
@@ -95,15 +145,15 @@ jobs:
|
95 | 145 | restore-keys: |
|
96 | 146 | ${{ runner.os }}-cargo-target-
|
97 | 147 |
|
| 148 | + - name: Generate code coverage |
| 149 | + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info |
| 150 | + |
98 | 151 | - name: Install cargo-sonar and run Clippy
|
99 | 152 | run: |
|
100 | 153 | cargo install cargo-sonar
|
101 | 154 | cargo clippy --message-format json > my-clippy-report.json
|
102 | 155 | cargo sonar --clippy-path my-clippy-report.json
|
103 | 156 |
|
104 |
| - - name: Generate code coverage |
105 |
| - run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info |
106 |
| - |
107 | 157 | - name: SonarQube Scan
|
108 | 158 | uses: SonarSource/sonarqube-scan-action@v4
|
109 | 159 | env:
|
|
0 commit comments