-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (39 loc) · 905 Bytes
/
ci.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
name: ci
on: ["push", "pull_request"]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- run: make generate
- run: make update-licenses
- run: make fmt
- run: make gomodtidy
- run: make fieldalignment
- uses: dominikh/[email protected]
with:
version: "2023.1.3"
install-go: false
- name: Verify repo is up-to-date
run: |
if [ -n "$(git status --porcelain)" ]; then
echo 'Updates required:'
git diff
exit 1
fi
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: go.mod
cache: true
- name: Run tests
run: make test