diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index fdbd6056..f2244b84 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -68,19 +68,12 @@ jobs: node_modules .git - - name: "check is SONAR_TOKEN exists" - env: - super_secret: ${{ secrets.SONAR_TOKEN }} - if: ${{ env.super_secret != '' }} - run: echo "SONAR_TOKEN_EXISTS=true" >> "$GITHUB_ENV" - - - name: Run SonarQube analysis - if: ${{ env.SONAR_TOKEN_EXISTS == 'true' }} - run: mvn sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }} + - name: SonarQube + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@master - if: ${{ env.SONAR_TOKEN_EXISTS == 'true' }} + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/regression_tests.yml b/.github/workflows/regression_tests.yml index a285a0cc..b0dbdb5e 100644 --- a/.github/workflows/regression_tests.yml +++ b/.github/workflows/regression_tests.yml @@ -1,4 +1,8 @@ name: Regression Tests + +concurrency: + group: ${{ github.workflow }} + on: workflow_call: inputs: diff --git a/README.md b/README.md index b67ac523..2e9446b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Regression Tests](https://github.com/NHSDigital/eligibility-signposting-api-regression-tests/actions/workflows/regression_tests.yml/badge.svg?branch=main)](https://github.com/NHSDigital/eligibility-signposting-api-regression-tests/actions/workflows/regression_tests.yml) - +[![AI Code Assurance](https://sonarcloud.io/api/project_badges/ai_code_assurance?project=NHSDigital_eligibility-signposting-api-regression-tests)](https://sonarcloud.io/summary/new_code?id=NHSDigital_eligibility-signposting-api-regression-tests) # Regression Tests These tests will automate End-to-End regression testing for: * [Eligibility Signposting API](https://github.com/NHSDigital/eligibility-signposting-api)