Skip to content

Commit d343aa7

Browse files
committed
ci: add basic build and test workflow
1 parent 9328215 commit d343aa7

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build:
11+
name: Build and Test
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
cache-dependency-path: web/frontend/package-lock.json
23+
24+
- name: Install Frontend Dependencies
25+
working-directory: web/frontend
26+
run: npm ci
27+
28+
- name: Build Frontend
29+
working-directory: web/frontend
30+
run: npm run build
31+
32+
- name: Copy Frontend Assets
33+
run: |
34+
# Create destination directory (files are embedded from internal/web/dist)
35+
mkdir -p internal/web
36+
# Copy built assets from web/frontend/dist to internal/web/dist
37+
cp -r web/frontend/dist internal/web/
38+
39+
- name: Setup Go
40+
uses: actions/setup-go@v5
41+
with:
42+
go-version: '1.24.0'
43+
cache: true
44+
45+
- name: Build Go Project
46+
run: go build -v ./...
47+
48+
- name: Run Go Tests
49+
run: go test -v ./...

0 commit comments

Comments
 (0)