-
Notifications
You must be signed in to change notification settings - Fork 514
66 lines (56 loc) · 1.66 KB
/
setup-tests.yaml
File metadata and controls
66 lines (56 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: "Run setup tests"
on:
push:
branches:
- main
- dev
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
env:
SHELL: /usr/bin/bash
jobs:
setup-tests:
runs-on: ubicloud-standard-8
env:
CI: "1"
steps:
- uses: actions/checkout@v6
- name: Setup Node.js v20
uses: actions/setup-node@v6
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install packages
run: pnpm install
- run: pnpm run build:packages
- run: pnpm run codegen
- run: pnpm run start-deps
- uses: JarvusInnovations/background-action@v1.0.7
with:
run: pnpm run dev &
wait-on: |
http://localhost:8102
tail: true
wait-for: 120s
log-output-if: true
- name: Run tests (debug cancellation)
run: |
set +e
trap 'echo "Received SIGTERM during tests"; pgrep -a node || true; ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true' TERM
pnpm run test --reporter=verbose -- --run --watch=false
status=$?
echo "Test exit code: $status"
exit $status
- name: Debug running processes
if: always()
run: |
echo "CI=$CI"
echo "Runner: $RUNNER_NAME $RUNNER_OS $RUNNER_ARCH"
echo "GitHub event: $GITHUB_EVENT_NAME"
node -v
pnpm -v
pgrep -a node || true
ps -eo pid,ppid,pgid,comm | rg -n "node|vitest|pnpm|turbo" || true