generated from xplorfin/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (35 loc) · 901 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Lint
on:
pull_request:
push:
branches:
- master
jobs:
lint:
if: ${{ !contains(toJSON(github.event.commits.*.message), '[ci nochecks]') }}
strategy:
matrix:
go-version:
- 1.16.x
platform:
- ubuntu-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Go modules cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Lint (golangci-lint)
uses: golangci/golangci-lint-action@v2
with:
skip-go-installation: true
skip-pkg-cache: true