v0.0.398 (#812) #70
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Created using @tscircuit/plop (npm install -g @tscircuit/plop) | |
| name: Bun Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| 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 |