-
-
Notifications
You must be signed in to change notification settings - Fork 369
59 lines (55 loc) · 1.46 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build
on: [push]
jobs:
code:
name: Code Check
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Vet
run: |
go vet ./pkg/app
go vet ./pkg/errors
go vet ./pkg/logs
go vet ./pkg/cache
go vet ./pkg/cli
server:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Run Unit Tests
run: |
go test -race ./pkg/app
go test -race ./pkg/errors
go test -race ./pkg/logs
go test -race ./pkg/cache
client:
name: WebAssembly Unit Tests
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.21"
- name: Checkout Code
uses: actions/checkout@v3
- name: Install WASM Browser Test
run: |
go install github.com/agnivade/wasmbrowsertest@latest
mv `go env GOPATH`/bin/wasmbrowsertest `go env GOPATH`/bin/go_js_wasm_exec
- name: Run Unit Tests
run: |
GOARCH=wasm GOOS=js go test ./pkg/app
GOARCH=wasm GOOS=js go test ./pkg/errors
GOARCH=wasm GOOS=js go test ./pkg/logs