-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.68 KB
/
node.js.yml
File metadata and controls
66 lines (54 loc) · 1.68 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: Node.js CI
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
# Required to checkout the code
contents: read
strategy:
matrix:
node-version: [24.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: |
package-lock.json
packages/bootstrap/package-lock.json
packages/multiplayer-template/package-lock.json
- name: Build and test
run: |
npm ci
npm run build
npm run test
- name: Lint
run: npm run lint
- name: Typecheck bootstrap
run: npm run typecheck
working-directory: ./packages/bootstrap
- name: npm link core locally
run: |
npm link
working-directory: ./packages/core
# multiplayer-template has its own nested workspaces (client/server) that npm
# workspaces does not handle recursively, so we need a separate npm ci here
- name: Build multiplayer-template
run: |
npm link @mavonengine/core
npm run typecheck
npm run build
npm run lint
working-directory: ./packages/multiplayer-template
- name: Start dev servers and verify startup
timeout-minutes: 1
run: npx concurrently --kill-others --success first "npm run dev" "npx wait-on http://localhost:8050/api/game/health --timeout 20000"
working-directory: ./packages/multiplayer-template