Skip to content

Lint

Lint #2007

Workflow file for this run

name: Lint
on: [push, pull_request]
# When a new revision is pushed to a PR, cancel all in-progress CI runs for that
# PR. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
strategy:
matrix:
go: ["1.19", "1.20"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go mod download
- run: .github/workflows/check-fmt
- run: .github/workflows/check-generate
coverage:
strategy:
matrix:
go: ["1.19", "1.20"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go mod download
- run: .github/workflows/check-coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
golangci-lint:
strategy:
matrix:
go: ["1.19", "1.20"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- name: golangci-lint
uses: golangci/[email protected]
with:
version: latest
# skip cache because of flaky behaviors
skip-build-cache: true
skip-pkg-cache: true
args: '--timeout 5m'