From 2fced8873a6f3a6ab23e8be6b74d774e7cacc051 Mon Sep 17 00:00:00 2001 From: Ben Menesini Date: Wed, 8 May 2024 02:43:41 +0000 Subject: [PATCH] Try waiting for the server --- .github/workflows/test.yml | 4 +++- package.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da9cba9..7623d22 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,9 @@ jobs: node-version: 18.x cache: npm - run: npm install - - run: npm run build + - run: npm run start-local-ci& + # Sleep for 60 seconds to allow the server to start + - run: sleep 60 - run: npm run test-ci -- --silent=false env: CI: true diff --git a/package.json b/package.json index cd5f577..f0c577d 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "webpack", "start": "npm run build -- --stats=errors-only && electron dist", "start-local": "npm run build -- --stats=errors-only && electron dist --control.address=http://localhost:4444 --control.username=streamwall --control.password=local-dev", + "start-local-ci": "xvfb-maybe npm run build -- --stats=errors-only && xvfb-maybe electron dist --control.address=http://localhost:4444 --control.username=streamwall --control.password=local-dev", "test": "jest", "test-ci": "xvfb-maybe jest" },