Skip to content

Commit d0528b9

Browse files
committed
chore: refactor SonarCloud job setup in CI workflow
1 parent fc22ccb commit d0528b9

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@ jobs:
3232
run: composer phpcs
3333
- name: Execute tests (Unit and Feature)
3434
run: composer test
35-
- name: 'Run SonarCloud scanner'
36-
if: ${{contains(github.ref, '/pull/')}}
37-
uses: SonarSource/sonarcloud-github-action@v2.2.0
38-
env:
39-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
35+
36+
sonar:
37+
name: SonarCloud
38+
runs-on: ubuntu-22.04
39+
needs: validate
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v5
43+
with:
44+
fetch-depth: 0
45+
46+
- name: Run SonarQube scan
47+
uses: minvws/action-sonarqube@v1
48+
with:
49+
sonar-token: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)