chore: update golangci-lint in github action #85
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: Checks | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| # Optional: allow read access to pull request. Use with `only-new-issues` option. | |
| # pull-requests: read | |
| jobs: | |
| # Check if there is any dirty change for go mod tidy | |
| go-mod: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Check go mod | |
| run: | | |
| go mod tidy | |
| git diff --exit-code go.mod | |
| git diff --exit-code go.sum | |
| golangci: | |
| name: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| go: [oldstable, stable] | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: v2.6 | |
| spell: | |
| name: "Spell check" | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 1 | |
| - uses: codespell-project/actions-codespell@v2 | |
| with: | |
| check_filenames: true | |
| check_hidden: true | |
| exclude_file: .golangci.yml | |
| typos: | |
| # https://github.com/crate-ci/typos | |
| # Add exceptions to _typos.toml | |
| # install and run locally: cargo install typos-cli && typos | |
| name: typos | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Actions Repository | |
| uses: actions/checkout@v5 | |
| - name: Check spelling of entire workspace | |
| uses: crate-ci/typos@v1 |