-
Notifications
You must be signed in to change notification settings - Fork 23
47 lines (43 loc) · 1.14 KB
/
Copy pathci.yml
File metadata and controls
47 lines (43 loc) · 1.14 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
# //go:embed all:dist requires at least one file; dashboard assets are
# gitignored and built separately. A tracked .gitkeep is the placeholder;
# recreate it here so a bare checkout never fails the embed.
- name: Ensure embed placeholder
run: mkdir -p internal/server/dist && touch internal/server/dist/.gitkeep
- name: Test
run: go test ./...
- name: Vet
run: go vet ./...
web:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Tests
run: bun test
- name: Typecheck
run: bun x tsc -b --noEmit
- name: Production build
run: bun run build