Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/bun-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
node: [1, 2, 3, 4, 5]

steps:
- name: Checkout code
Expand All @@ -21,14 +25,28 @@ jobs:
- name: Install dependencies
run: bun install

- name: Run tests
run: bun test --timeout 300000
- 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
name: diff-png-and-snap-svg-artifacts-node${{ matrix.node }}
path: |
**/*.diff.png
**/*.snap.svg
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,6 @@ cosmos-export
.yalc
yalc.lock
**/.claude/settings.local.json

# Generated test plans
.bun-test-plan/
4 changes: 4 additions & 0 deletions bun-test-plan.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"nodeCount": 5,
"globPatterns": ["tests/bugs/bugreport23.test.ts", "tests/**/*.test.{ts,tsx}"]
}
Loading