0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-30 22:34:18 -05:00

add github action for golangci

This commit is contained in:
Will Norris 2020-09-09 22:19:27 -07:00
parent d6e0ad0f93
commit 9f2d0f0dbc
2 changed files with 21 additions and 7 deletions

21
.github/workflows/linter.yml vendored Normal file
View file

@ -0,0 +1,21 @@
on: [push, pull_request]
name: linter
jobs:
lint:
strategy:
matrix:
go-version: [1.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.31
- name: Run go fmt
run: diff -u <(echo -n) <(gofmt -d -s .)

View file

@ -24,13 +24,6 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Run go fmt
if: runner.os != 'Windows'
run: diff -u <(echo -n) <(gofmt -d -s .)
- name: Run go vet
run: go vet ./...
- name: Run go test
run: go test -v -race -coverprofile coverage.txt -covermode atomic ./...