lint.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Lint
  2. on:
  3. - push
  4. - pull_request
  5. env:
  6. CGO_LDFLAGS_ALLOW: "-s|-w"
  7. jobs:
  8. lint:
  9. runs-on: ubuntu-latest
  10. container:
  11. image: darthsim/imgproxy-ci:latest
  12. strategy:
  13. matrix:
  14. go-version: ["1.19.x"]
  15. vips-version: ["8.12"]
  16. steps:
  17. - name: Checkout
  18. uses: actions/checkout@v2
  19. - uses: actions/setup-go@v2
  20. with:
  21. go-version: ${{ matrix.go-version }}
  22. - name: Cache mods
  23. uses: actions/cache@v3
  24. with:
  25. path: |
  26. ~/.cache/go-build
  27. ~/go/pkg/mod
  28. key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
  29. - name: Download mods
  30. run: go mod download
  31. - name: Lint
  32. uses: golangci/golangci-lint-action@v3
  33. with:
  34. version: v1.46.2
  35. args: --timeout 5m0s
  36. skip-cache: true
  37. env:
  38. LD_LIBRARY_PATH: "${{ env.LD_LIBRARY_PATH }}:/root/vips/${{ matrix.vips-version }}/lib"
  39. PKG_CONFIG_PATH: "${{ env.PKG_CONFIG_PATH }}:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"