Skip to content

Commit f423cd2

Browse files
GenerQAQclaude
andauthored
feat(ci): add landingpage CI workflows and dependabot config (#281)
* feat(ci): add landingpage CI workflows and dependabot config Add test workflow for landingpage with lint, integration tests (vitest), and e2e tests (Playwright). Include landingpage in dependabot and security scan coverage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(landingpage): update dependencies Update payload packages to 3.76.1, @opennextjs/cloudflare to 1.16.5, playwright to 1.58.2, motion to 12.34.0, lucide-react to 0.564.0, and other minor version bumps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): specify pnpm version in landingpage workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(landingpage): add @eslint/eslintrc as explicit dev dependency The eslint config imports @eslint/eslintrc directly but it was only available as a transitive dependency, causing CI to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(landingpage): override @isaacs/brace-expansion to fix high severity vulnerability Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): upgrade Node.js to 22 for landingpage workflow Node 20 doesn't support --no-experimental-strip-types and has esbuild/jsdom TextEncoder compatibility issues. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(landingpage): fix CI test failures - Add optional chaining for realpath() in payload.config.ts to handle undefined return when argv path doesn't exist - Change vitest environment from jsdom to node for integration tests, fixing esbuild TextEncoder invariant violation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(ci): generate .env instead of .env.local for landingpage tests dotenv/config (used by vitest setup) reads .env files, not .env.local. The .env.local convention is Next.js-specific. Using .env ensures both vitest and Next.js can read the PAYLOAD_SECRET. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(landingpage): fix e2e test assertions - Update homepage test to match actual title ("Acontext") and assert h1 visibility instead of hardcoded scaffold text - Use regex for admin list view URL assertion to allow query params - Increase beforeAll timeout to 60s for admin tests (seed + login) - Remove unused page variable and simplify frontend test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d454f1b commit f423cd2

11 files changed

Lines changed: 1474 additions & 2105 deletions

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,23 @@ updates:
7272
development-dependencies:
7373
dependency-type: "development"
7474

75+
- package-ecosystem: "npm"
76+
directory: "/landingpage"
77+
schedule:
78+
interval: "weekly"
79+
open-pull-requests-limit: 5
80+
target-branch: "deps"
81+
commit-message:
82+
prefix: "chore(deps):"
83+
groups:
84+
production-dependencies:
85+
dependency-type: "production"
86+
development-dependencies:
87+
dependency-type: "development"
88+
ignore:
89+
- dependency-name: "*"
90+
update-types: ["version-update:semver-major"]
91+
7592
- package-ecosystem: "docker"
7693
directory: "/src/server/api/go"
7794
schedule:
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Landing Page Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
paths:
9+
- "landingpage/**"
10+
- ".github/workflows/landingpage-test.yaml"
11+
pull_request:
12+
branches:
13+
- main
14+
- dev
15+
paths:
16+
- "landingpage/**"
17+
- ".github/workflows/landingpage-test.yaml"
18+
19+
jobs:
20+
lint-and-build:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
defaults:
25+
run:
26+
working-directory: landingpage
27+
steps:
28+
- uses: actions/checkout@v6
29+
30+
- name: Setup pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: 10
34+
35+
- name: Set up Node.js
36+
uses: actions/setup-node@v6
37+
with:
38+
node-version: "22"
39+
cache: "pnpm"
40+
cache-dependency-path: landingpage/pnpm-lock.yaml
41+
42+
- name: Install dependencies
43+
run: pnpm install --frozen-lockfile
44+
45+
- name: Run lint
46+
run: pnpm run lint
47+
48+
test-int:
49+
runs-on: ubuntu-latest
50+
needs: lint-and-build
51+
permissions:
52+
contents: read
53+
defaults:
54+
run:
55+
working-directory: landingpage
56+
steps:
57+
- uses: actions/checkout@v6
58+
59+
- name: Setup pnpm
60+
uses: pnpm/action-setup@v4
61+
with:
62+
version: 10
63+
64+
- name: Set up Node.js
65+
uses: actions/setup-node@v6
66+
with:
67+
node-version: "22"
68+
cache: "pnpm"
69+
cache-dependency-path: landingpage/pnpm-lock.yaml
70+
71+
- name: Generate .env
72+
run: |
73+
echo "PAYLOAD_SECRET=$(openssl rand -hex 32)" >> .env
74+
echo 'NEXT_PUBLIC_SERVER_URL="http://localhost:3000"' >> .env
75+
76+
- name: Install dependencies
77+
run: pnpm install --frozen-lockfile
78+
79+
- name: Run integration tests
80+
run: pnpm run test:int
81+
82+
test-e2e:
83+
runs-on: ubuntu-latest
84+
needs: lint-and-build
85+
permissions:
86+
contents: read
87+
defaults:
88+
run:
89+
working-directory: landingpage
90+
steps:
91+
- uses: actions/checkout@v6
92+
93+
- name: Setup pnpm
94+
uses: pnpm/action-setup@v4
95+
with:
96+
version: 10
97+
98+
- name: Set up Node.js
99+
uses: actions/setup-node@v6
100+
with:
101+
node-version: "22"
102+
cache: "pnpm"
103+
cache-dependency-path: landingpage/pnpm-lock.yaml
104+
105+
- name: Generate .env
106+
run: |
107+
echo "PAYLOAD_SECRET=$(openssl rand -hex 32)" >> .env
108+
echo 'NEXT_PUBLIC_SERVER_URL="http://localhost:3000"' >> .env
109+
110+
- name: Install dependencies
111+
run: pnpm install --frozen-lockfile
112+
113+
- name: Install Playwright browsers
114+
run: pnpm exec playwright install --with-deps chromium
115+
116+
- name: Run e2e tests
117+
run: pnpm run test:e2e
118+
env:
119+
CI: true
120+
121+
- name: Upload Playwright report
122+
uses: actions/upload-artifact@v6
123+
if: ${{ !cancelled() }}
124+
with:
125+
name: playwright-report
126+
path: landingpage/playwright-report/
127+
retention-days: 30

.github/workflows/security-reusable.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,6 @@ jobs:
7171
- name: Audit UI
7272
working-directory: src/server/ui
7373
run: pnpm audit --audit-level=high --prod
74+
- name: Audit Landing Page
75+
working-directory: landingpage
76+
run: pnpm audit --audit-level=high --prod

.github/workflows/security-scan.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
- 'src/client/acontext-ts/package-lock.json'
1717
- 'src/server/ui/package.json'
1818
- 'src/server/ui/pnpm-lock.yaml'
19+
- 'landingpage/package.json'
20+
- 'landingpage/pnpm-lock.yaml'
1921
- '.github/workflows/security-scan.yaml'
2022
- '.github/workflows/security-reusable.yaml'
2123
pull_request:
@@ -33,6 +35,8 @@ on:
3335
- 'src/client/acontext-ts/package-lock.json'
3436
- 'src/server/ui/package.json'
3537
- 'src/server/ui/pnpm-lock.yaml'
38+
- 'landingpage/package.json'
39+
- 'landingpage/pnpm-lock.yaml'
3640
- '.github/workflows/security-scan.yaml'
3741
- '.github/workflows/security-reusable.yaml'
3842
workflow_dispatch:

landingpage/package.json

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"dependencies": {
2828
"@gsap/react": "^2.1.2",
2929
"@next/third-parties": "^16.1.6",
30-
"@opennextjs/cloudflare": "^1.16.2",
31-
"@payloadcms/db-d1-sqlite": "3.74.0",
32-
"@payloadcms/next": "3.74.0",
33-
"@payloadcms/plugin-seo": "^3.74.0",
34-
"@payloadcms/richtext-lexical": "3.74.0",
35-
"@payloadcms/storage-r2": "3.74.0",
36-
"@payloadcms/ui": "3.74.0",
30+
"@opennextjs/cloudflare": "^1.16.5",
31+
"@payloadcms/db-d1-sqlite": "3.76.1",
32+
"@payloadcms/next": "3.76.1",
33+
"@payloadcms/plugin-seo": "^3.76.1",
34+
"@payloadcms/richtext-lexical": "3.76.1",
35+
"@payloadcms/storage-r2": "3.76.1",
36+
"@payloadcms/ui": "3.76.1",
3737
"@radix-ui/react-slot": "^1.2.4",
3838
"@tailwindcss/postcss": "^4.1.18",
3939
"class-variance-authority": "^0.7.1",
@@ -42,11 +42,11 @@
4242
"dotenv": "16.6.1",
4343
"graphql": "^16.12.0",
4444
"gsap": "^3.14.2",
45-
"lucide-react": "^0.563.0",
46-
"motion": "^12.31.0",
45+
"lucide-react": "^0.564.0",
46+
"motion": "^12.34.0",
4747
"next": "15.5.12",
4848
"next-themes": "^0.4.6",
49-
"payload": "3.74.0",
49+
"payload": "3.76.1",
5050
"postcss": "^8.5.6",
5151
"react": "19.2.4",
5252
"react-dom": "19.2.4",
@@ -55,23 +55,24 @@
5555
"tailwindcss": "^4.1.18"
5656
},
5757
"devDependencies": {
58-
"@playwright/test": "1.58.1",
58+
"@eslint/eslintrc": "^3.3.3",
59+
"@playwright/test": "1.58.2",
5960
"@testing-library/react": "16.3.2",
60-
"@types/node": "^22.19.8",
61-
"@types/react": "19.2.11",
61+
"@types/node": "^22.19.11",
62+
"@types/react": "19.2.14",
6263
"@types/react-dom": "19.2.3",
6364
"@vitejs/plugin-react": "4.7.0",
6465
"eslint": "^9.39.2",
6566
"eslint-config-next": "15.5.12",
6667
"jsdom": "26.1.0",
67-
"playwright": "1.58.1",
68-
"playwright-core": "1.58.1",
68+
"playwright": "1.58.2",
69+
"playwright-core": "1.58.2",
6970
"prettier": "^3.8.1",
7071
"tw-animate-css": "^1.4.0",
7172
"typescript": "5.9.3",
7273
"vite-tsconfig-paths": "5.1.4",
7374
"vitest": "3.2.4",
74-
"wrangler": "~4.62.0"
75+
"wrangler": "~4.65.0"
7576
},
7677
"engines": {
7778
"node": "^18.20.2 || >=20.9.0",
@@ -84,7 +85,10 @@
8485
"sharp",
8586
"unrs-resolver",
8687
"workerd"
87-
]
88+
],
89+
"overrides": {
90+
"@isaacs/brace-expansion": ">=5.0.1"
91+
}
8892
},
8993
"cloudflare": {
9094
"bindings": {

0 commit comments

Comments
 (0)