Skip to content

Commit 45e739d

Browse files
committed
chore(e2e): wait for dev server boot
1 parent be725d6 commit 45e739d

File tree

4 files changed

+327
-3
lines changed

4 files changed

+327
-3
lines changed

.github/actions/test-e2e/action.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ runs:
1212
run: npm i
1313
- name: Run e2e tests
1414
shell: bash
15-
run: npx nx run test-app-e2e:e2e --ci
15+
run: npm run test:e2e
1616

dev-script.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ try {
1616
// ensure the deps exist before we start the servers
1717
execSync('npm run build', { cwd: cdnPath, stdio: 'inherit'})
1818

19-
concurrently(
19+
const {result, commands} = concurrently(
2020
[{
2121
cwd: cdnPath,
2222
command: 'npm run watch',
@@ -29,3 +29,14 @@ concurrently(
2929
command: 'npx nx run test-app:serve',
3030
}]
3131
)
32+
33+
result.catch((e) => {
34+
console.error(e)
35+
})
36+
37+
// cleanup dev servers
38+
process.on('SIGINT', () => {
39+
commands.forEach((c) => {
40+
c.kill()
41+
})
42+
})

0 commit comments

Comments
 (0)