Skip to content

Commit e43aba9

Browse files
authored
chore: update SonarCloud action (#4780)
* Updated SonarQube action * removed scheduled rin * test * revert * revert [skip ci] * test * revert * test * test triggered * test triggered ? * sonar config
1 parent 07bb0c3 commit e43aba9

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/phpunit.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
# Allow manually triggering the workflow.
99
workflow_dispatch:
1010

11+
permissions:
12+
checks: write
13+
pull-requests: write
14+
1115
jobs:
1216
unit-tests:
1317
runs-on: ${{ matrix.operating-system }}
@@ -38,7 +42,7 @@ jobs:
3842
uses: shivammathur/setup-php@v2
3943
with:
4044
php-version: ${{ matrix.php-versions }}
41-
coverage: pcov #optional, setup coverage driver
45+
coverage: xdebug #optional, setup coverage driver
4246
env:
4347
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4448

@@ -111,13 +115,13 @@ jobs:
111115
github_token: ${{ secrets.GITHUB_TOKEN }}
112116
files: tests/logging/*.xml
113117

114-
- name: SonarCloud Scan
115-
uses: SonarSource/sonarcloud-github-action@master
118+
- name: SonarQube Scan
119+
uses: SonarSource/sonarqube-scan-action@v5
116120
continue-on-error: true
117-
if: ${{ (matrix.php-versions == '8.1') && (matrix.mysql-version == '5.7') }} && SONAR_TOKEN
121+
if: ${{ (matrix.php-versions == '8.1') && (matrix.mysql-version == '5.7') }}
118122
with:
119123
args: >
120124
-Dproject.settings=tests/sonar-project.properties
121125
env:
122-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
126+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123127
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/workflow.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ jobs:
136136
needs.check.outputs.phpunit > 0 ||
137137
needs.check.outputs.workflow > 0
138138
uses: ./.github/workflows/phpunit.yml
139+
secrets:
140+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
139141

140142
cypress:
141143
name: Cypress E2E Tests

tests/sonar-project.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
sonar.projectKey=openmage-lts
2-
sonar.organization=openmage
1+
sonar.projectKey=OpenMage_magento-lts
2+
sonar.organization=OpenMage
33

44
# This is the name and version displayed in the SonarCloud UI.
55
#sonar.projectName=openmage-lts

0 commit comments

Comments
 (0)