-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (47 loc) · 1.36 KB
/
golintci.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
41
42
43
44
45
46
47
48
49
50
51
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
env:
GO111MODULE: on
concurrency:
# Cancel previous workflows on branch push
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.18.x
- name: Cache Go modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: build-${{ hashFiles('**/go.sum') }}
- name: Install protobuf codegen tool
run: |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip
unzip protoc-3.14.0-linux-x86_64.zip -d $HOME/.local
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install non-module tools
run: |
cd /tmp
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go install github.com/vektra/mockery/[email protected]
- name: Build
run: make codegen mocks
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
skip-pkg-cache: true