diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 1961821..228a55a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -37,6 +37,12 @@ jobs: - name: Test unit run: npm run test:unit + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + test-terraform: runs-on: ubuntu-latest @@ -52,5 +58,5 @@ jobs: with: terraform_version: 1.10.3 - - name: Terraform fmt + - name: Test formatting run: terraform fmt -list=true -check -recursive -diff diff --git a/README.md b/README.md index 0366baf..bbbbe41 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=CRRU-UK_website&metric=bugs)](https://sonarcloud.io/summary/new_code?id=CRRU-UK_website) [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=CRRU-UK_website&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=CRRU-UK_website) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=CRRU-UK_website&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=CRRU-UK_website) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=CRRU-UK_website&metric=coverage)](https://sonarcloud.io/summary/new_code?id=CRRU-UK_website) 1. [Introduction](#introduction) 2. [Overview](#overview) diff --git a/.sonarcloud.properties b/sonar-project.properties similarity index 52% rename from .sonarcloud.properties rename to sonar-project.properties index f2a5e6f..1a529fd 100644 --- a/.sonarcloud.properties +++ b/sonar-project.properties @@ -1,3 +1,7 @@ +sonar.projectKey=CRRU-UK_website +sonar.organization=crru + sonar.sources=. +sonar.javascript.lcov.reportPaths=./coverage/lcov.info sonar.cpd.exclusions=**/*.spec.ts,**/*.spec.tsx,src/helpers/types.ts,src/helpers/constants.ts,src/pages/**/*