fix(ci): fix server start in cypress e2e test

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-05-04 22:26:26 +02:00
parent 33629b945d
commit 44e0ae40b5

View file

@ -159,8 +159,8 @@ jobs:
matrix: matrix:
containers: [ 1, 2, 3 ] containers: [ 1, 2, 3 ]
steps: steps:
- name: Install jq and zstd - name: Install additional packages
run: apt-get update && apt-get install -y jq zstd run: apt-get update && apt-get install -y jq zstd screen
- name: Check out repo - name: Check out repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
@ -182,12 +182,12 @@ jobs:
- name: Run server - name: Run server
working-directory: frontend/ working-directory: frontend/
run: yarn start:ci & run: (screen -dmS server -L yarn start:ci) && sleep 3 && (tail -f screenlog.0 &)
env: env:
NODE_ENV: test NODE_ENV: test
- name: Wait for server - name: Wait for server
run: "sleep 3 && curl --max-time 120 http://127.0.0.1:3001/" run: "curl -L --max-time 120 http://127.0.0.1:3001/"
- name: Run cypress - name: Run cypress
run: yarn turbo run test:e2e:ci --filter=frontend run: yarn turbo run test:e2e:ci --filter=frontend