1234567891011121314151617181920212223242526272829303132333435363738 |
- name: Lint
- on:
- pull_request:
- types: [opened, edited, synchronize, reopened]
- paths:
- - '**.go'
- - 'go.mod'
- - 'go.sum'
- - 'tools/check/revive.toml'
- - '.github/workflows/lint.yaml'
- jobs:
- lint:
- name: Lint
- runs-on: ubuntu-latest
- steps:
- - name: Set up Go
- uses: actions/setup-go@v4
- with:
- go-version: '1.20'
- - name: Check out code into the Go module directory
- uses: actions/checkout@v3
- - name: Check licenses
- run: |
- go install github.com/google/go-licenses@latest
- $(go env GOPATH)/bin/go-licenses check ./... --disallowed_types forbidden,restricted,unknown --ignore modernc.org/mathutil
- - name: Run Revive Action
- uses: docker://morphy/revive-action:v2
- with:
- config: tools/check/revive.toml
- - name: Check formatting
- run: test -z $(gofmt -l .) || (gofmt -l . && exit 1)
|