-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (68 loc) · 2.03 KB
/
Copy pathci.yml
File metadata and controls
84 lines (68 loc) · 2.03 KB
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
name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
jobs:
go:
name: Go build + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Forbidden symbols
run: .github/scripts/check-forbidden-symbols.sh
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
cache: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install Linux UI dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev libglib2.0-dev
# Ubuntu 24.04 uses libwebkit2gtk-4.1-dev; older images use 4.0.
if apt-cache show libwebkit2gtk-4.1-dev >/dev/null 2>&1; then
WEBKIT_DEV_PKG="libwebkit2gtk-4.1-dev"
elif apt-cache show libwebkit2gtk-4.0-dev >/dev/null 2>&1; then
WEBKIT_DEV_PKG="libwebkit2gtk-4.0-dev"
else
echo "No supported WebKitGTK dev package found on this runner."
exit 1
fi
sudo apt-get install -y --no-install-recommends "${WEBKIT_DEV_PKG}"
- name: Build frontend assets for go:embed
run: |
npm ci --prefix frontend
npm run build --prefix frontend
- name: go build
run: go build ./...
- name: go vet
run: go vet ./...
- name: go test
run: go test ./...
frontend:
name: Frontend build
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: npm install
run: npm ci
- name: npm build
run: npm run build