chore(deps): bump github.com/go-chi/chi/v5 from 5.2.5 to 5.3.0 in the go-dependencies group #28
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
| # CI for go-sdk | |
| # | |
| # Action pinning strategy: | |
| # - First-party `actions/*` actions are pinned to a major version tag | |
| # (e.g. `@v4`). GitHub maintains these and rotates the tag forward | |
| # within the major version for security fixes. | |
| # - Third-party actions (none currently used) MUST be pinned to a full | |
| # commit SHA with a `# vX.Y.Z` trailing comment. | |
| # | |
| # Go version matrix is derived from the `go` directive in go.mod | |
| # (floor) and the latest stable release published by the Go team. | |
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "LICENSE" | |
| - ".gitignore" | |
| - ".editorconfig" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: test (go ${{ matrix.go }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Floor: `go` directive from go.mod (1.25.x). Ceiling: latest stable. | |
| go: ["1.25.x", "stable"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Go ${{ matrix.go }} | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: true | |
| - name: Download modules | |
| run: go mod download | |
| - name: go vet | |
| run: go vet ./... | |
| - name: gofmt drift check | |
| run: gofmt -l . | tee /dev/stderr | (! read -r) | |
| - name: Build | |
| run: go build ./... | |
| - name: Test (race) | |
| run: go test -v -race ./... 2>&1 | tee test-output.txt | |
| shell: bash | |
| - name: Test (coverage) | |
| if: matrix.go == 'stable' | |
| run: | | |
| pkgs=$(go list ./... | grep -vE 'examples|recipes|cmd' | paste -sd, -) | |
| go test -coverprofile=coverage.out -coverpkg="$pkgs" ./... -count=1 -timeout 120s | |
| go tool cover -func=coverage.out | tee coverage-summary.txt | |
| total=$(go tool cover -func=coverage.out | tail -1 | awk '{print $NF}' | tr -d '%') | |
| echo "Total coverage: ${total}%" | |
| shell: bash | |
| - name: Upload coverage summary | |
| if: matrix.go == 'stable' && always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-summary | |
| path: coverage-summary.txt | |
| retention-days: 30 | |
| if-no-files-found: ignore | |
| # Upload Go coverage profile from the `stable` matrix entry only. | |
| # Non-blocking so a Codecov outage cannot break CI. | |
| - name: Upload coverage to Codecov | |
| if: matrix.go == 'stable' | |
| # codecov/codecov-action v6.0.1 | |
| uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 | |
| with: | |
| fail_ci_if_error: false | |
| flags: unittests | |
| files: ./coverage.out | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test output on failure | |
| if: failure() && hashFiles('test-output.txt') != '' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: test-output-go-${{ matrix.go }} | |
| path: test-output.txt | |
| retention-days: 7 | |
| if-no-files-found: ignore |