-
Notifications
You must be signed in to change notification settings - Fork 0
23 lines (23 loc) · 770 Bytes
/
linters.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Go Linters - GitHub Actions
name: linters
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Checkout code
uses: actions/checkout@v2
- name: Install golangci-lint
run: |
go version
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
- name: Run required linters in .golangci.yml plus hard-coded ones here
run: make -w GOLINT=$(go env GOPATH)/bin/golangci-lint lint
- name: Run optional linters (not required to pass)
run: make -w GOLINT=$(go env GOPATH)/bin/golangci-lint lint-extra