-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.02 KB
/
run-staticcheck.yaml
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
name: staticcheck
on:
push:
branches:
- '*'
tags-ignore:
- '*'
paths-ignore:
- '**/*.md'
- '**/.gitignore'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
go: ["1.21"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: go get .
- name: Run vet
run: go vet -v ./...
- name: Check diff of goimports
run: |
go install golang.org/x/tools/cmd/goimports@latest
goimports -w . && git diff --exit-code
- name: Setup staticcheck
uses: dominikh/[email protected]
with:
version: "2023.1.6"
install-go: false
min-go-version: ${{ matrix.go }}
cache-key: ${{ matrix.os }}-${{ matrix.go }}
- name: Run staticcheck
run: staticcheck ./...