Skip to content

Commit

Permalink
try to fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vaind committed Aug 1, 2024
1 parent bb3eb73 commit 281313f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -437,11 +437,12 @@ jobs:
-camera-front none
-timezone US/Pacific
script: |
pgrep -f appium
./scripts/e2e.mjs ${{ matrix.platform }} --test
# For some reason there's another appium process running that prevents the emulator to stop.
# We need to kill it manually.
pgrep -f appium
pkill -f appium
pkill -f appium || echo
- uses: actions/cache@v4
if: ${{ matrix.platform == 'ios' }}
Expand Down
6 changes: 5 additions & 1 deletion scripts/e2e.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ if (actions.includes('test')) {
await newProcess('adb logcat', adbLogProcess);
}

// execSync(`yarn test --verbose`, { stdio: 'inherit', cwd: e2eDir, env: testEnv });
execSync(`yarn test --verbose`, { stdio: 'inherit', cwd: e2eDir, env: testEnv });
} finally {
for (const [name, info] of Object.entries(processesToKill)) {
console.log(`Sending termination signal to process '${name}' (${info.process.pid})`);
Expand All @@ -243,6 +243,10 @@ if (actions.includes('test')) {
clearTimeout(killTimeout);

console.log(`Process '${name}' (${info.process.pid}) exited with code ${code}`);

// In CI, there's still an issue with the process staying alive after the parent process has exited,
// blocking the pipeline indefinitely. This detaches the child process from the parent process.
if (env.CI) info.process.unref();
}
}
}
Expand Down

0 comments on commit 281313f

Please sign in to comment.