Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
# At job level so the scan step's `if` can see it: a step cannot test an
# environment variable it defines itself.
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Comment on lines +11 to +14
steps:
- uses: actions/checkout@v7
with:
Expand All @@ -24,7 +28,12 @@ jobs:
# nosemgrep: generic.secrets.security.detected-sonarqube-docs-api-key
# The hex string is this action's pinned commit SHA, not a key. Pinning
# is what SonarCloud's githubactions:S7637 asks for.
#
# Skipped when SONAR_TOKEN is absent, which is the case on dependabot
# pull requests: they run without repository secrets, and a scan that
# cannot authenticate would fail the check for a reason unrelated to
# the change.
if: env.SONAR_TOKEN != ''
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ jobs:
with:
coverage-reports: cover.out
force-coverage-parser: go
# Uploading coverage is best-effort. Dependabot pull requests run
# without repository secrets, so CODACY_PROJECT_TOKEN is empty there
# and the action fails; that should not turn a passing test run red.
continue-on-error: true
if: runner.os != 'Windows'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
Expand Down
Loading