Merge pull request #26 from groupcache/thrawn/fix-lint-issues #71
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| pull_request: | |
| branches: | |
| - master | |
| - main | |
| jobs: | |
| on-pull-request: | |
| name: test | |
| strategy: | |
| matrix: | |
| go-version: | |
| - 1.24.x | |
| os: [ ubuntu-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true # caching and restoring go modules and build outputs | |
| - run: go env | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-- | |
| - name: go mod tidy | |
| run: go mod tidy && git diff --exit-code | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.6.1 | |
| skip-cache: true # cache/restore is done by actions/setup-go@v3 step | |
| args: -v | |
| - name: Install deps | |
| run: go mod download | |
| - name: Test | |
| run: go test ./... | |