-
Notifications
You must be signed in to change notification settings - Fork 15
80 lines (67 loc) · 2.06 KB
/
ci.yaml
File metadata and controls
80 lines (67 loc) · 2.06 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
node-checks:
name: Node checks (typecheck, build, scans)
runs-on: ubuntu-latest
env:
NEXT_TELEMETRY_DISABLED: "1"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install
run: npm ci --legacy-peer-deps
- name: Typecheck
run: npx tsc --noEmit
- name: Build
run: npm run build
- name: Scan for non-i18n Chinese
run: npm run scan:chinese
- name: Brand guard (Litewrite only)
run: |
set -euo pipefail
if grep -RIn --exclude-dir=.git --exclude-dir=node_modules --exclude-dir=.next --exclude-dir=.github --fixed-strings "LiteWrite" .; then
echo
echo "Found forbidden brand string: LiteWrite"
echo "Please use: Litewrite"
exit 1
fi
docker-and-compose:
name: Docker/Compose validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker version
run: docker version
- name: Compose config (dev + prod)
run: |
set -euo pipefail
if docker compose version >/dev/null 2>&1; then
docker compose -f docker-compose.yml config >/dev/null
docker compose -f docker-compose.prod.yml config >/dev/null
else
docker-compose -f docker-compose.yml config >/dev/null
docker-compose -f docker-compose.prod.yml config >/dev/null
fi
- name: Docker build (web, ws, ai-server, nanobot, compile)
run: |
set -euo pipefail
docker build -f Dockerfile .
docker build -f Dockerfile.ws .
docker build -f ai-server/Dockerfile ai-server
docker build -f nanobot/Dockerfile nanobot
docker build -f compile-server/Dockerfile compile-server