Skip to content

Commit 7c892bf

Browse files
committed
flesh it out
1 parent d343aa7 commit 7c892bf

File tree

2 files changed

+40
-10
lines changed

2 files changed

+40
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ main, master ]
5+
# branches: [ main ]
66
pull_request:
7-
branches: [ main, master ]
7+
88

99
jobs:
1010
build:
@@ -21,6 +21,7 @@ jobs:
2121
cache: 'npm'
2222
cache-dependency-path: web/frontend/package-lock.json
2323

24+
# frontend build and test steps
2425
- name: Install Frontend Dependencies
2526
working-directory: web/frontend
2627
run: npm ci
@@ -29,21 +30,50 @@ jobs:
2930
working-directory: web/frontend
3031
run: npm run build
3132

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/
33+
- name: Run Frontend Lint
34+
working-directory: web/frontend
35+
run: npm run lint
3836

37+
# Backend
3938
- name: Setup Go
4039
uses: actions/setup-go@v5
4140
with:
42-
go-version: '1.24.0'
41+
go-version: '1.24.1'
4342
cache: true
4443

44+
- name: Copy Frontend Assets
45+
run: |
46+
mkdir -p internal/web
47+
cp -r web/frontend/dist internal/web/
48+
4549
- name: Build Go Project
4650
run: go build -v ./...
4751

4852
- name: Run Go Tests
4953
run: go test -v ./...
54+
55+
# Project site
56+
- name: Setup Node.js
57+
uses: actions/setup-node@v4
58+
with:
59+
node-version: 20
60+
cache: 'npm'
61+
cache-dependency-path: web/project-site/package-lock.json
62+
63+
- name: Install swag
64+
run: go install github.com/swaggo/swag/cmd/swag@latest
65+
66+
- name: Generate API documentation
67+
run: swag init -g server/main.go -o web/project-site/public/api --outputTypes json --dir cmd,internal
68+
69+
- name: Install dependencies
70+
working-directory: web/project-site
71+
run: npm ci
72+
73+
- name: Build project site
74+
working-directory: web/project-site
75+
run: npm run build
76+
77+
- name: Run project site lint
78+
working-directory: web/project-site
79+
run: npm run lint

.github/workflows/project-website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Go
3535
uses: actions/setup-go@v5
3636
with:
37-
go-version: '1.21'
37+
go-version: '1.24.1'
3838

3939
- name: Install swag
4040
run: go install github.com/swaggo/swag/cmd/swag@latest

0 commit comments

Comments
 (0)