diff --git a/.github/workflows/node-api.yml b/.github/workflows/node-api.yml index 3c45e2800..7bf63e65f 100644 --- a/.github/workflows/node-api.yml +++ b/.github/workflows/node-api.yml @@ -114,6 +114,9 @@ jobs: - name: Build Python API working-directory: ./api-node run: yarn python-api:build + - name: Build Node API + working-directory: ./api-node + run: yarn build:ci - name: Run E2E tests working-directory: ./api-node run: yarn test:e2e:ci diff --git a/api-node/scripts/run-e2e-tests.ts b/api-node/scripts/run-e2e-tests.ts index 65f0980f3..0ec15db70 100644 --- a/api-node/scripts/run-e2e-tests.ts +++ b/api-node/scripts/run-e2e-tests.ts @@ -22,6 +22,13 @@ nodeApi.stderr.on('data', (data) => { console.error('[NestJS]', data.toString()); }); +nodeApi.on('close', (code) => { + if (code !== 0) { + console.error(`NestJS finished with code ${code}`); + process.exit(code); + } +}); + const pythonApi = childProcess.spawn('yarn', ['python-api:start']); pythonApi.stdout.on('data', (data) => { @@ -36,6 +43,13 @@ pythonApi.stderr.on('data', (data) => { console.error('[Flask]', data.toString()); }); +pythonApi.on('close', (code) => { + if (code !== 0) { + console.error(`Flask finished with code ${code}`); + process.exit(code); + } +}); + function checkAndRunTests(): void { console.log('checkAndRunTests', { nodeApiStarted, pythonApiStarted }); if (nodeApiStarted && pythonApiStarted) {