Fix CI: modernize golangci-lint config and scope linting #82
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: Main | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| env: | |
| GO_VERSION: "1.23" | |
| GOLANGCI_LINT_VERSION: v1.61.0 | |
| jobs: | |
| main: | |
| name: Main Process | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go ${{ env.GO_VERSION }} | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Check and get dependencies | |
| run: | | |
| go mod tidy | |
| git diff --exit-code go.mod | |
| git diff --exit-code go.sum | |
| - name: Vet | |
| run: go vet ./ ./http2utils/... ./h2spec | |
| - name: Unit tests | |
| run: go test ./ | |
| - name: h2spec conformance suite | |
| run: go test ./h2spec | |
| # The examples/ and benchmark/ trees track an older API and are not part | |
| # of the library build, so lint only the real packages. | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: ${{ env.GOLANGCI_LINT_VERSION }} | |
| args: ./ ./http2utils/... ./h2spec |