mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-29 08:22:11 +02:00
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
name: Lint
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
env:
|
|
CGO_LDFLAGS_ALLOW: "-s|-w"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: darthsim/imgproxy-ci:latest
|
|
strategy:
|
|
matrix:
|
|
go-version: ["1.18.x"]
|
|
vips-version: ["8.12"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Cache mods
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
- name: Download mods
|
|
run: go mod download
|
|
- name: Lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
version: v1.45.2
|
|
args: --timeout 2m0s
|
|
skip-cache: true
|
|
env:
|
|
LD_LIBRARY_PATH: "${{ env.LD_LIBRARY_PATH }}:/root/vips/${{ matrix.vips-version }}/lib"
|
|
PKG_CONFIG_PATH: "${{ env.PKG_CONFIG_PATH }}:/root/vips/${{ matrix.vips-version }}/lib/pkgconfig"
|