Skip to content

Commit a31a374

Browse files
ci: add RSC E2E workflow for rsc-demo
Adds a new CI workflow that: - Builds both app1 and app2 RSC demo apps - Verifies SSR registry injection in built bundles - Verifies all manifest files are generated - Runs the full RSC E2E test suite (341 tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 2de6c9b commit a31a374

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ jobs:
138138
uses: ./.github/workflows/e2e-router.yml
139139
secrets: inherit
140140

141+
e2e-rsc:
142+
needs: checkout-install
143+
uses: ./.github/workflows/e2e-rsc.yml
144+
secrets: inherit
145+
141146
e2e-metro:
142147
permissions:
143148
contents: read

.github/workflows/e2e-rsc.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# .github/workflows/e2e-rsc.yml
2+
name: E2E RSC Demo
3+
4+
on:
5+
workflow_call:
6+
7+
jobs:
8+
e2e-rsc:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 30
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Cache Tool Downloads
18+
uses: actions/cache@v4
19+
with:
20+
path: ~/.cache
21+
key: ${{ runner.os }}-toolcache-${{ hashFiles('pnpm-lock.yaml') }}
22+
restore-keys: |
23+
${{ runner.os }}-toolcache-
24+
25+
- name: Install Pnpm
26+
run: |
27+
corepack prepare [email protected] --activate
28+
corepack enable
29+
30+
- name: Setup Node.js 18
31+
uses: actions/setup-node@v5
32+
with:
33+
node-version: '18'
34+
cache: 'pnpm'
35+
36+
- name: Set Nx SHA
37+
uses: nrwl/nx-set-shas@v3
38+
39+
- name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable
40+
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> "$GITHUB_ENV"
41+
42+
- name: Install Dependencies
43+
run: pnpm install
44+
45+
- name: Run Build for All Packages
46+
run: npx nx run-many --targets=build --projects=tag:type:pkg
47+
48+
- name: Build RSC Demo App1
49+
working-directory: apps/rsc-demo/packages/app1
50+
run: pnpm build
51+
52+
- name: Build RSC Demo App2
53+
working-directory: apps/rsc-demo/packages/app2
54+
run: pnpm build
55+
56+
- name: Verify SSR Registry Injection
57+
run: |
58+
echo "Checking app1 SSR registry injection..."
59+
head -c 100 apps/rsc-demo/packages/app1/build/ssr.js | grep -q "__RSC_SSR_REGISTRY_INJECTED__" || (echo "ERROR: SSR registry not injected in app1" && exit 1)
60+
echo "Checking app2 SSR registry injection..."
61+
head -c 100 apps/rsc-demo/packages/app2/build/ssr.js | grep -q "__RSC_SSR_REGISTRY_INJECTED__" || (echo "ERROR: SSR registry not injected in app2" && exit 1)
62+
echo "SSR registry injection verified in both apps"
63+
64+
- name: Verify Manifest Files
65+
run: |
66+
echo "Checking manifest files..."
67+
test -f apps/rsc-demo/packages/app1/build/react-client-manifest.json || (echo "ERROR: react-client-manifest.json missing in app1" && exit 1)
68+
test -f apps/rsc-demo/packages/app1/build/react-ssr-manifest.json || (echo "ERROR: react-ssr-manifest.json missing in app1" && exit 1)
69+
test -f apps/rsc-demo/packages/app1/build/react-server-actions-manifest.json || (echo "ERROR: react-server-actions-manifest.json missing in app1" && exit 1)
70+
test -f apps/rsc-demo/packages/app2/build/react-client-manifest.json || (echo "ERROR: react-client-manifest.json missing in app2" && exit 1)
71+
test -f apps/rsc-demo/packages/app2/build/react-ssr-manifest.json || (echo "ERROR: react-ssr-manifest.json missing in app2" && exit 1)
72+
test -f apps/rsc-demo/packages/app2/build/react-server-actions-manifest.json || (echo "ERROR: react-server-actions-manifest.json missing in app2" && exit 1)
73+
echo "All manifest files present"
74+
75+
- name: Run RSC E2E Tests
76+
working-directory: apps/rsc-demo/packages/e2e
77+
run: pnpm test:rsc

0 commit comments

Comments
 (0)