Testing Framwork #17
+27
-11
@@ -61,9 +61,15 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
# start app, wait, run tests
|
# start app, wait, run tests
|
||||||
- run: npm run start &
|
- name: Start Next.js
|
||||||
env: { CI: true }
|
run: npm run start -- -p 3000 -H 0.0.0.0 &
|
||||||
- run: npx wait-on http://localhost:3000
|
env:
|
||||||
|
CI: true
|
||||||
|
- name: Verify server is up
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
curl -v http://127.0.0.1:3000 || exit 1
|
||||||
|
- run: npx wait-on http://127.0.0.1:3000
|
||||||
- run: npx playwright test --project=${{ matrix.browser }}
|
- run: npx playwright test --project=${{ matrix.browser }}
|
||||||
env: { CI: true }
|
env: { CI: true }
|
||||||
|
|
||||||
@@ -90,9 +96,15 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npx playwright install --with-deps
|
- run: npx playwright install --with-deps
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: npm run start &
|
- name: Start Next.js
|
||||||
env: { CI: true }
|
run: npm run start -- -p 3000 -H 0.0.0.0 &
|
||||||
- run: npx wait-on http://localhost:3000
|
env:
|
||||||
|
CI: true
|
||||||
|
- name: Verify server is up
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
curl -v http://127.0.0.1:3000 || exit 1
|
||||||
|
- run: npx wait-on http://127.0.0.1:3000
|
||||||
|
|
||||||
# Seed snapshots on main branch only (one-time setup)
|
# Seed snapshots on main branch only (one-time setup)
|
||||||
- name: Seed snapshots (main only)
|
- name: Seed snapshots (main only)
|
||||||
@@ -138,12 +150,16 @@ jobs:
|
|||||||
- name: Build application
|
- name: Build application
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Start application
|
- name: Start Next.js
|
||||||
run: npm run start &
|
run: npm run start -- -p 3000 -H 0.0.0.0 &
|
||||||
env: { CI: true }
|
env:
|
||||||
|
CI: true
|
||||||
|
- name: Verify server is up
|
||||||
|
run: |
|
||||||
|
sleep 5
|
||||||
|
curl -v http://127.0.0.1:3000 || exit 1
|
||||||
- name: Wait for application
|
- name: Wait for application
|
||||||
run: npx wait-on http://localhost:3000
|
run: npx wait-on http://127.0.0.1:3000
|
||||||
|
|
||||||
- name: Run Lighthouse CI
|
- name: Run Lighthouse CI
|
||||||
run: npx lhci autorun --chrome-path="$CHROME_PATH"
|
run: npx lhci autorun --chrome-path="$CHROME_PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user