Repository navigation
91 lines (74 loc) · 2.59 KB
/
Copy pathci.yml
File metadata and controls
91 lines (74 loc) · 2.59 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
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [main, 'claude/**']
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
env:
# Public env vars are embedded at build time; use placeholder values
# so Firebase client SDK initializes without error
NEXT_PUBLIC_FIREBASE_API_KEY: placeholder
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: placeholder.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID: placeholder
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: placeholder.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: "000000000000"
NEXT_PUBLIC_FIREBASE_APP_ID: "1:000000000000:web:placeholder"
NEXT_PUBLIC_BASE_URL: https://dmforge.org
NEXT_PUBLIC_FIREBASE_USE_EMULATORS: "false"
# Server-side secrets (GEMINI_API_KEY, STRIPE_SECRET_KEY,
# FIREBASE_SERVICE_ACCOUNT_JSON) are not needed at build time —
# they are only read when API routes are invoked at request time.
unit:
name: Unit specs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
# Pure-logic specs only: no server, no credentials, no browser binaries
# (none of them request the `page` fixture). The rest of tests/e2e needs
# a live deployment and stays manual in e2e.yml. Add a spec here only if
# it runs with neither BASE_URL nor secrets.
- name: Run unit and component specs (Vitest)
run: yarn test:run
- name: Run pure logic E2E specs
run: yarn playwright test tests/e2e/result-state.spec.js tests/e2e/script-text.spec.js --reporter=list
env:
PLAYWRIGHT_SKIP_WEBSERVER: '1'
secret-scan:
name: Secret scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Gitleaks
uses: gitleaks/gitleaks-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}