Skip to content

Commit 7d3c251

Browse files
committed
fix tests attempt
1 parent 76e0d04 commit 7d3c251

4 files changed

Lines changed: 55 additions & 13 deletions

File tree

.github/workflows/restart-dev-and-test-with-custom-base-port.yaml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
runs-on: ubicloud-standard-8
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
22+
CI: "1"
2223

2324
steps:
2425
- uses: actions/checkout@v6
@@ -37,10 +38,14 @@ jobs:
3738
- name: Start dev environment
3839
run: pnpm run restart-dev-environment
3940

40-
- name: Run tests (no watch)
41-
env:
42-
CI: "1"
43-
run: pnpm run test --reporter=verbose -- --run --watch=false
41+
- name: Run tests (debug cancellation)
42+
run: |
43+
set +e
44+
trap 'echo "Received SIGTERM during tests"; pgrep -a node || true; ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true' TERM
45+
pnpm run test --reporter=verbose -- --run --watch=false
46+
status=$?
47+
echo "Test exit code: $status"
48+
exit $status
4449
4550
- name: Print dev server logs
4651
run: cat dev-server.log.untracked.txt
@@ -50,6 +55,8 @@ jobs:
5055
if: always()
5156
run: |
5257
echo "CI=$CI"
58+
echo "Runner: $RUNNER_NAME $RUNNER_OS $RUNNER_ARCH"
59+
echo "GitHub event: $GITHUB_EVENT_NAME"
5360
node -v
5461
pnpm -v
5562
pgrep -a node || true

.github/workflows/restart-dev-and-test.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ env:
1717
jobs:
1818
restart-dev-and-test:
1919
runs-on: ubicloud-standard-8
20+
env:
21+
CI: "1"
2022

2123
steps:
2224
- uses: actions/checkout@v6
@@ -35,10 +37,14 @@ jobs:
3537
- name: Start dev environment
3638
run: pnpm run restart-dev-environment
3739

38-
- name: Run tests (no watch)
39-
env:
40-
CI: "1"
41-
run: pnpm run test --reporter=verbose -- --run --watch=false
40+
- name: Run tests (debug cancellation)
41+
run: |
42+
set +e
43+
trap 'echo "Received SIGTERM during tests"; pgrep -a node || true; ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true' TERM
44+
pnpm run test --reporter=verbose -- --run --watch=false
45+
status=$?
46+
echo "Test exit code: $status"
47+
exit $status
4248
4349
- name: Print dev server logs
4450
run: cat dev-server.log.untracked.txt
@@ -48,6 +54,8 @@ jobs:
4854
if: always()
4955
run: |
5056
echo "CI=$CI"
57+
echo "Runner: $RUNNER_NAME $RUNNER_OS $RUNNER_ARCH"
58+
echo "GitHub event: $GITHUB_EVENT_NAME"
5159
node -v
5260
pnpm -v
5361
pgrep -a node || true

.github/workflows/setup-tests-with-custom-base-port.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
runs-on: ubicloud-standard-8
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
22+
CI: "1"
2223

2324
steps:
2425
- uses: actions/checkout@v6
@@ -46,4 +47,22 @@ jobs:
4647
tail: true
4748
wait-for: 120s
4849
log-output-if: true
49-
- run: pnpm run test --reporter=verbose
50+
- name: Run tests (debug cancellation)
51+
run: |
52+
set +e
53+
trap 'echo "Received SIGTERM during tests"; pgrep -a node || true; ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true' TERM
54+
pnpm run test --reporter=verbose -- --run --watch=false
55+
status=$?
56+
echo "Test exit code: $status"
57+
exit $status
58+
59+
- name: Debug running processes
60+
if: always()
61+
run: |
62+
echo "CI=$CI"
63+
echo "Runner: $RUNNER_NAME $RUNNER_OS $RUNNER_ARCH"
64+
echo "GitHub event: $GITHUB_EVENT_NAME"
65+
node -v
66+
pnpm -v
67+
pgrep -a node || true
68+
ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true

.github/workflows/setup-tests.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ env:
1717
jobs:
1818
setup-tests:
1919
runs-on: ubicloud-standard-8
20+
env:
21+
CI: "1"
2022
steps:
2123
- uses: actions/checkout@v6
2224

@@ -43,15 +45,21 @@ jobs:
4345
tail: true
4446
wait-for: 120s
4547
log-output-if: true
46-
- name: Run tests (no watch)
47-
env:
48-
CI: "1"
49-
run: pnpm run test --reporter=verbose -- --run --watch=false
48+
- name: Run tests (debug cancellation)
49+
run: |
50+
set +e
51+
trap 'echo "Received SIGTERM during tests"; pgrep -a node || true; ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true' TERM
52+
pnpm run test --reporter=verbose -- --run --watch=false
53+
status=$?
54+
echo "Test exit code: $status"
55+
exit $status
5056
5157
- name: Debug running processes
5258
if: always()
5359
run: |
5460
echo "CI=$CI"
61+
echo "Runner: $RUNNER_NAME $RUNNER_OS $RUNNER_ARCH"
62+
echo "GitHub event: $GITHUB_EVENT_NAME"
5563
node -v
5664
pnpm -v
5765
pgrep -a node || true

0 commit comments

Comments
 (0)