-
Notifications
You must be signed in to change notification settings - Fork 37
52 lines (43 loc) · 1.35 KB
/
bun-test.yml
File metadata and controls
52 lines (43 loc) · 1.35 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
# Created using @tscircuit/plop (npm install -g @tscircuit/plop)
name: Bun Test
on:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
node: [1, 2, 3, 4, 5]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup bun
uses: oven-sh/setup-bun@v1
with:
bun-version: 1.3.5
- name: Install dependencies
run: bun install
- name: Install bun-test-plan
run: npm install -g @tscircuit/bun-test-plan
- name: Generate test plans
run: bun-test-plan
- name: Run tests for node ${{ matrix.node }}
run: |
if [ "${{ matrix.node }}" = "1" ]; then
# Node 1: Run only the long-running test
bun test tests/bugs/bugreport23.test.ts --timeout 300000
else
# Other nodes: Run from generated test plan
mapfile -t test_files < .bun-test-plan/testplans/testplan${{ matrix.node }}.txt
bun test "${test_files[@]}" --timeout 300000
fi
- name: Upload diff PNG and SVG snapshot artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: diff-png-and-snap-svg-artifacts-node${{ matrix.node }}
path: |
**/*.diff.png
**/*.snap.svg