-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (47 loc) · 1.21 KB
/
push-pr-lint.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
50
51
52
53
54
55
56
name: lint, test and build image
on: [pull_request, push]
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
args: --config .golangci.yml --timeout 2m
version: v1.52.2
- name: Test
run: go test ./...
verify-docs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
- name: Generate docs
run: make gen-docs
- name: Verify docs are up to date
run: git diff | (! grep .)
build:
runs-on: ubuntu-latest
needs: [lint-test, verify-docs]
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Checkout code
uses: actions/checkout@v3
- name: build binary
run: make build-linux
- name: Inspect action SARIF report
run: cat ${{ steps.scan.outputs.sarif }}
if: always()