Repository navigation
66 lines (53 loc) · 1.64 KB
/
Copy pathbuild.yml
File metadata and controls
66 lines (53 loc) · 1.64 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
name: Build and Test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
# The frontend consumes the shared @ha/ui design system through a
# file: dependency (frontend/package.json -> ../ha-ui), pinned as a git
# submodule at the repo root, so a recursive checkout is all the setup
# the dependency needs — no host paths, no sudo path replication.
- uses: actions/checkout@v7
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: '1.26'
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: |
go mod tidy
(cd "$GITHUB_WORKSPACE/ha-ui" && npm ci)
cd "$GITHUB_WORKSPACE/frontend" && npm ci
- name: Build frontend
run: cd frontend && npm run build
- name: Run Go tests
run: go test ./...
- name: Type check frontend
run: cd frontend && npm run typecheck
- name: Lint frontend
run: cd frontend && npm run lint
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
- name: Build application
run: |
go install github.com/wailsapp/wails/v2/cmd/wails@v2.15.0
wails build
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: build-output
path: build/bin/