-
Notifications
You must be signed in to change notification settings - Fork 1.1k
57 lines (54 loc) · 1.33 KB
/
go.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
57
name: Go lint, build, and test
on:
push:
branches: main
pull_request:
branches: main
defaults:
run:
working-directory: ./app
jobs:
go-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.4
- uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
only-new-issues: false
docker-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker lint
uses: hadolint/[email protected]
with:
dockerfile: Dockerfile
failure-threshold: warning
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:v0.10.6
buildkitd-flags: --debug
- name: Build
run: make build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.4
- name: Formatting
run: if [ -n "$(go fmt)" ]; then echo 'Code is not formatted with "go fmt"'; false; fi
- name: Test
run: make test