Skip to content

Commit

Permalink
ci(sonarcloud): run only when not root-less (testcontainers#1608)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 authored Sep 12, 2023
1 parent ca25fc5 commit b1b4a07
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
# Optional: working directory, useful for monorepos
working-directory: ${{ inputs.project-directory }}
# Optional: golangci-lint command line arguments.
args: --verbose
args: --verbose --out-format=checkstyle:golangci-lint.report.xml
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
skip-cache: true
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
make test-unit
- name: Analyze with SonarCloud
if: ${{ github.ref_name == 'main' && github.repository_owner == 'testcontainers' && inputs.run-tests && inputs.project-directory == '.' }}
if: ${{ github.ref_name == 'main' && github.repository_owner == 'testcontainers' && inputs.run-tests && !inputs.rootless-docker && inputs.project-directory == '.' }}
uses: sonarsource/sonarcloud-github-action@master
with:
projectBaseDir: ${{ inputs.project-directory }}
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ linters-settings:
- standard
- default
- prefix(github.com/testcontainers)

run:
timeout: 5m
6 changes: 5 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ sonar.organization=testcontainers
sonar.projectKey=testcontainers_testcontainers-go

sonar.projectName=testcontainers-go

sonar.projectVersion=v0.23.0

sonar.sources=.

sonar.exclusions=**/*_test.go,**/vendor/**,**/testdata/*

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**
sonar.go.tests.reportPaths=TEST-*.xml

sonar.go.coverage.reportPaths=coverage.out
sonar.go.golangci-lint.reportPaths=golangci-lint.report.xml
sonar.go.tests.reportPaths=TEST-unit.xml

0 comments on commit b1b4a07

Please sign in to comment.