-
Notifications
You must be signed in to change notification settings - Fork 25
56 lines (53 loc) · 1.44 KB
/
build-test.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: "Build & Test"
on: # yamllint disable-line rule:truthy
push:
branches:
- "!dependabot/*"
- "*"
pull_request:
branches:
- "*"
merge_group:
types:
- "checks_requested"
jobs:
build:
name: "Build Binary"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "~1.19.1"
- uses: "authzed/actions/go-build@main"
image-build:
name: "Build Container Image"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "authzed/actions/docker-build@main"
unit:
name: "Run Unit Tests"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "${{ env.GO_VERSION }}"
cache: "true"
- uses: "authzed/action-spicedb@v1"
- uses: "authzed/actions/go-test@main"
development:
name: "WASM Tests"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-go@v3"
with:
go-version: "${{ env.GO_VERSION }}"
cache: "false" # do not cache to prevent cache poisoning
- name: "Install wasmbrowsertest"
run: "go install github.com/agnivade/wasmbrowsertest@latest"
- name: "Run WASM Tests"
run: "GOOS=js GOARCH=wasm go test ./pkg/wasm/... -exec $(go env GOPATH)/bin/wasmbrowsertest"