diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c4c5613..068dcf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 - name: Install PHP @@ -32,8 +32,18 @@ jobs: run: composer phpcs - name: Execute tests (Unit and Feature) run: composer test - - name: 'Run SonarCloud scanner' - if: ${{contains(github.ref, '/pull/')}} - uses: SonarSource/sonarcloud-github-action@v2.2.0 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + sonar: + name: SonarCloud + runs-on: ubuntu-22.04 + needs: validate + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Run SonarQube scan + uses: minvws/action-sonarqube@v1 + with: + sonar-token: ${{ secrets.SONAR_TOKEN }}