-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 855 Bytes
/
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
name: Go lint, build, and test
on:
push:
branches: main
pull_request:
branches: main
jobs:
lint:
runs-on: ubuntu-latest
container: ghcr.io/opencontainers/golangci-lint:v1.39.0
steps:
- uses: actions/checkout@v3
- name: Lint
run: make lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.4
- name: Build
run: make build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18.4
- name: Formatting
run: if [ -n "$(go fmt)" ]; then echo 'Code is not formatted with "go fmt"'; false; fi
- name: Test
run: make test