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:
parent
d6e0ad0f93
commit
9f2d0f0dbc
2 changed files with 21 additions and 7 deletions
21
.github/workflows/linter.yml
vendored
Normal file
21
.github/workflows/linter.yml
vendored
Normal 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 .)
|
7
.github/workflows/tests.yml
vendored
7
.github/workflows/tests.yml
vendored
|
@ -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 ./...
|
||||
|
||||
|
|
Loading…
Reference in a new issue