Update go.starlark.net digest to bf296ed #237
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Go | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| permissions: | |
| contents: read | |
| # Optional: allow read access to pull request. Use with `only-new-issues` option. | |
| pull-requests: read | |
| # Optional: allow write access to checks to allow the action to annotate code in the PR. | |
| checks: write | |
| env: | |
| GOCACHE: "/tmp/go-cache" | |
| GOMODCACHE: "/tmp/go-mod-cache" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| # Fetch all history for proper SonarQube analysis | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| cache-dependency-path: go.sum | |
| - name: Display Go version | |
| run: go version | |
| - name: go mod tidy (fails if changes are needed) | |
| run: go mod tidy --diff | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| cache-invalidation-interval: 30 | |
| - name: Go test | |
| run: | | |
| go test -coverprofile=unit.coverage.out -cover ./... | |
| - name: SonarQube Scan | |
| uses: SonarSource/sonarqube-scan-action@v6 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| with: | |
| args: > | |
| -Dsonar.projectKey=robbyt_go-polyscript | |
| -Dsonar.organization=robbyt | |
| -Dsonar.go.coverage.reportPaths=unit.coverage.out | |
| -Dsonar.sources=. | |
| -Dsonar.coverage.exclusions=examples/** | |
| -Dsonar.exclusions=**/*_test.go | |
| -Dsonar.tests=. | |
| -Dsonar.test.inclusions=**/*_test.go | |
| -Dsonar.language=go | |
| -Dsonar.sourceEncoding=UTF-8 | |
| -Dsonar.cpd.exclusions=**/* |