-
Notifications
You must be signed in to change notification settings - Fork 40
37 lines (36 loc) · 1.1 KB
/
golangci-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
name: golangci-lint
on:
push:
pull_request:
workflow_dispatch:
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/bin/golangci-lint
key: golangci-lint-1.53.3
- uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: git config --global url."https://${{ secrets.GH_ACCESS_TOKEN }}@github.com".insteadOf "https://github.com"
- run: go env -w GOPRIVATE="github.com/bnb-chain/*"
- run: go mod tidy && go mod download
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.53.3
skip-pkg-cache: true
args: --timeout=99m