-
Notifications
You must be signed in to change notification settings - Fork 22
51 lines (49 loc) · 1.36 KB
/
build.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
---
name: "build"
on:
push:
branches:
- "master"
pull_request:
branches:
- "!dependabot/*"
- "*"
jobs:
lint:
name: "Lint Go"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.18"
- uses: "authzed/actions/gofumpt@main"
- uses: "authzed/actions/go-mod-tidy@main"
- uses: "authzed/actions/go-generate@main"
- uses: "authzed/actions/golangci-lint@main"
test:
name: "Test"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-go@v2"
with:
go-version: "^1.16"
- uses: "authzed/action-testserver@v3"
- name: "go test"
run: "go test -tags integration ./..."
protobuf:
name: "Generate Protobufs"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/setup-go@v2"
with:
go-version: "^1.16"
- name: "Install local Go Protobuf plugins"
run: "go install github.com/envoyproxy/protoc-gen-validate@v0.6.1"
- uses: "actions/checkout@v2"
- uses: "bufbuild/buf-setup-action@v0.6.0"
with:
version: "1.0.0-rc12"
- name: "Generate & Diff Protos"
run: "./buf.gen.yaml && git diff --text && bash -c '[ $(git status --porcelain | tee /dev/fd/2 | wc -c) -eq 0 ]'"