-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.75 KB
/
Copy pathinfra.yml
File metadata and controls
61 lines (53 loc) · 1.75 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
name: infra
on:
push:
branches: [main]
paths:
- "infra/**"
- ".github/workflows/infra.yml"
pull_request:
paths:
- "infra/**"
- ".github/workflows/infra.yml"
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: infra
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: infra/package-lock.json
# FrontendStack's BucketDeployment (lib/frontend-stack.ts) bundles
# `../frontend/dist` as a real CDK asset at synth time — every real
# `cdk deploy` needs the frontend built first regardless, and
# frontend-stack.test.ts exercises that same code path, so it needs
# a real dist/ here too, not a stub. Mirrors frontend.yml's own
# build steps (including the amplify_outputs.json placeholder — see
# its comment there) rather than duplicating a different recipe.
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Build frontend (needed by FrontendStack's asset bundling)
working-directory: frontend
run: |
cp amplify_outputs.example.json amplify_outputs.json
npm install
npm run build
- name: Install
run: npm ci
- name: Type-check
run: npx tsc --noEmit
- name: Test
run: npm test
# Build-correctness check only — confirms every stack synthesizes.
# Never runs `cdk deploy` from CI; deploys stay a manual, explicitly
# authorized action for this project.
- name: Synth
run: npx cdk synth --all