Skip to content

Bump guibranco/github-infisical-secrets-check-action (#67) #148

Bump guibranco/github-infisical-secrets-check-action (#67)

Bump guibranco/github-infisical-secrets-check-action (#67) #148

Workflow file for this run

name: Sonar Cloud Analysis
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
run: rustup update stable
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install Clippy
run: rustup component add clippy
- name: Install cargo-sonar and run Clippy
run: |
cargo install cargo-sonar
cargo clippy --all-features --all-targets --message-format=json -- --warn clippy::all > clippy.json
cargo sonar --clippy
- name: Build with coverage
run: |
RUSTFLAGS="-C instrument-coverage" cargo build
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.externalIssuesReportPaths=sonar-issues.json
-Dcommunity.rust.lcov.reportPaths=lcov.info