1
0
mirror of synced 2025-12-30 12:02:01 -05:00

automatically start server for jest (#26206)

* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked
This commit is contained in:
Peter Bengtsson
2022-03-18 17:46:07 -04:00
committed by GitHub
parent c050d0f0d1
commit 4fcd3ae25f
13 changed files with 430 additions and 288 deletions

View File

@@ -59,5 +59,8 @@ jobs:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}
- name: Run build script
run: npm run build
- name: Run browser-test
run: npm run browser-test

View File

@@ -140,16 +140,6 @@ jobs:
NODE_ENV: test
run: ./script/warm-before-tests.mjs
- name: Start production-like server in the background
if: ${{ matrix.test-group == 'rendering' || matrix.test-group == 'routing' || matrix.test-group == 'content' }}
env:
NODE_ENV: test
PORT: 4000
run: |
node server.mjs &
sleep 3
curl --retry-connrefused --retry 5 -I --fail http://localhost:4000/healthz
- name: Run tests
env:
DIFF_FILE: get_diff_files.txt