123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- name: Lint
- concurrency:
- group: lint-${{ github.event_name }}-${{ github.ref }}
- cancel-in-progress: true
- on:
- pull_request:
- types: [opened, edited, synchronize, reopened]
- paths:
- - '**.go'
- - 'go.mod'
- - 'go.sum'
- - 'tools/check/.golangci.yaml'
- - '.github/workflows/lint.yaml'
- jobs:
- check_licenses:
- 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
- golangci_lint:
- runs-on: ubuntu-latest
- needs:
- - check_licenses
- 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: Install dependencies
- env:
- DEBIAN_FRONTEND: noninteractive
- run: |
- sudo apt-get install -y --no-install-recommends pkg-config libzmq3-dev
- - name: golangci-lint
- uses: golangci/golangci-lint-action@v3
- with:
- version: latest
- args: --config tools/check/.golangci.yaml
|