lint.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Lint
  2. on:
  3. pull_request:
  4. types: [opened, edited, synchronize, reopened]
  5. paths:
  6. - '**.go'
  7. - 'go.mod'
  8. - 'go.sum'
  9. - 'tools/check/.golangci.yaml'
  10. - '.github/workflows/lint.yaml'
  11. jobs:
  12. lint:
  13. name: Lint
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Set up Go
  17. uses: actions/setup-go@v4
  18. with:
  19. go-version: '1.20'
  20. - name: Check out code into the Go module directory
  21. uses: actions/checkout@v3
  22. - name: Check licenses
  23. run: |
  24. go install github.com/google/go-licenses@latest
  25. $(go env GOPATH)/bin/go-licenses check ./... --disallowed_types forbidden,restricted,unknown --ignore modernc.org/mathutil
  26. - name: Install dependencies
  27. env:
  28. DEBIAN_FRONTEND: noninteractive
  29. run: |
  30. sudo apt-get install -y --no-install-recommends pkg-config libzmq3-dev
  31. - name: golangci-lint
  32. uses: golangci/golangci-lint-action@v3
  33. with:
  34. version: latest
  35. args: --config tools/check/.golangci.yaml