-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (74 loc) · 1.99 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Build
on: [ push, pull_request ]
jobs:
go-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Test internal
run: go test -v ./internal/...
- name: Test pkg
run: go test -v ./pkg/...
build-vue:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '20' ]
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
- name: Installing Vite
working-directory: ./static/UI
run: npm install -g vite
- name: Installing node project dependencies
working-directory: ./static/UI
run: npm install
- name: Building the project
working-directory: ./static/UI
run: npm run build
- name: Upload artifact for deployment jobs
uses: actions/upload-artifact@v4
with:
name: vue-frontend
path: |
static/UI/dist/
!static/UI/node_modules/
build-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Build wasm
run: GOOS=js GOARCH=wasm go build -o main.wasm wasm/*.go
- uses: actions/upload-artifact@master
with:
name: go-wasm
path: main.wasm
build-go:
needs: ['build-vue', 'build-wasm']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18.x
- uses: actions/download-artifact@master
with:
name: vue-frontend
path: static/UI/dist
- uses: actions/download-artifact@master
with:
name: go-wasm
path: static/UI/dist
- name: Generate
run: go generate -v ./...
- name: Build
run: go build -v .