Skip to content

Commit 33f033e

Browse files
Reenable sonarcloud
1 parent 6542c0e commit 33f033e

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/_test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ on:
2727
required: false
2828
CODECOV_TOKEN:
2929
required: false
30+
SONAR_TOKEN:
31+
required: false
3032
SENTRY_DSN:
3133
required: false
3234

@@ -263,6 +265,13 @@ jobs:
263265
with:
264266
token: ${{ secrets.CODECOV_TOKEN }}
265267

268+
- name: SonarQube Scan
269+
if: ${{ !cancelled() && (env.GITHUB_WORKFLOW_RUNTIME != 'ACT') && matrix.runner == 'ubuntu-latest' }}
270+
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
271+
env:
272+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
273+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
274+
266275
- name: Assert no test failures
267276
# Single gate that fails the job if any test suite failed. Kept last so
268277
# that all reporting steps (Codecov, SonarQube, artifact upload) always

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ jobs:
142142
AIGNOSTICS_CLIENT_ID_DEVICE_PRODUCTION: ${{ secrets.AIGNOSTICS_CLIENT_ID_DEVICE_PRODUCTION }}
143143
AIGNOSTICS_REFRESH_TOKEN_PRODUCTION: ${{ secrets.AIGNOSTICS_REFRESH_TOKEN_PRODUCTION }}
144144
GCP_CREDENTIALS_PRODUCTION: ${{ secrets.GCP_CREDENTIALS_PRODUCTION }}
145+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
145146
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
146147
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} # For metrics
147148

@@ -162,7 +163,6 @@ jobs:
162163
sonarcloud:
163164
needs: [get-commit-message, test]
164165
if: |
165-
!cancelled() &&
166166
(!contains(needs.get-commit-message.outputs.commit_message, 'skip:ci')) &&
167167
(!contains(needs.get-commit-message.outputs.commit_message, 'build:native:only')) &&
168168
(!contains(github.event.pull_request.labels.*.name, 'skip:ci')) &&
@@ -178,13 +178,6 @@ jobs:
178178
with:
179179
fetch-depth: 0
180180

181-
- name: Download test coverage
182-
continue-on-error: true
183-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
184-
with:
185-
name: test-results-ubuntu-latest
186-
path: .
187-
188181
- name: SonarQube Scan
189182
if: ${{ env.GITHUB_WORKFLOW_RUNTIME != 'ACT' }}
190183
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0

0 commit comments

Comments
 (0)