ci: add golangci-lint

This commit is contained in:
Ondřej Budai 2020-02-28 15:11:59 +01:00 committed by Tom Gundersen
parent 2a3a5b318b
commit 7de9b88a3e

32
.github/workflows/lint.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Lint
# NOTE(mhayden): Restricting branches prevents jobs from being doubled since
# a push to a pull request triggers two events.
on:
pull_request:
branches:
- "*"
push:
branches:
- master
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Install golangci-lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.23.7
- name: Run golangci-lint
run: $(go env GOPATH)/bin/golangci-lint run