-
Notifications
You must be signed in to change notification settings - Fork 18
66 lines (54 loc) · 1.84 KB
/
Copy pathnode.yml
File metadata and controls
66 lines (54 loc) · 1.84 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: Server & Web
on:
push:
branches: [develop]
paths:
- "apps/server/**"
- "apps/web/**"
- "packages/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/node.yml"
pull_request:
paths:
- "apps/server/**"
- "apps/web/**"
- "packages/**"
- "package.json"
- "package-lock.json"
- ".github/workflows/node.yml"
jobs:
build:
name: build, lint & test
runs-on: ubuntu-latest
env:
# `prisma generate` reads DATABASE_URL through prisma.config.ts but never
# connects, so a placeholder is enough and no service container is needed.
DATABASE_URL: postgresql://docksight:docksight@localhost:5432/docksight?schema=public
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
# apps/server and apps/web import @docksight/protocol from its dist
# output, so the shared package has to be built before anything else.
- name: Build protocol
run: npm run build --workspace=@docksight/protocol
- name: Protocol conformance (fixtures match the TypeScript types)
run: npm run test --workspace=@docksight/protocol
- name: Generate Prisma client
run: npm run prisma:generate --workspace=@docksight/server
- name: Build server
run: npm run build --workspace=@docksight/server
- name: Lint server
run: npm run lint --workspace=@docksight/server
- name: Test server
run: npm run test --workspace=@docksight/server -- --passWithNoTests
- name: Build web
run: npm run build --workspace=@docksight/web
- name: Lint web
run: npm run lint --workspace=@docksight/web
- name: Test web
run: npm run test --workspace=@docksight/web