diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2692cb8..2b953dd 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + jobs: build: @@ -20,3 +21,12 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + - name: Run Clippy + run: cargo clippy --all-targets --all-features + + cleanup: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml new file mode 100644 index 0000000..20a85e8 --- /dev/null +++ b/.github/workflows/sonarqube.yml @@ -0,0 +1,18 @@ +name: Sonarqube +on: + workflow_run: + workflows: ["Rust"] + types: + - completed +jobs: + sonarqube: + name: SonarQube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v6 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..0ba6b4f --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,14 @@ +sonar.projectKey=andilar_trickle_zip +sonar.organization=andilar + + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=trickle_zip +#sonar.projectVersion=1.0 + + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8