updated workflows for linting #2
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: Lint | |
| on: [ push, pull_request ] | |
| env: | |
| # Common versions | |
| GO_VERSION: '1.24.0' | |
| GOLANGCI_VERSION: 'v2.2.2' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache: false # The golangci-lint action does its own caching. | |
| - name: Check go mod tidy | |
| working-directory: ./api | |
| run: go mod tidy && git diff --exit-code go.mod go.sum | |
| - name: Lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: ${{ env.GOLANGCI_VERSION }} | |
| working-directory: ./api | |