Skip to content

Improve CAD Model Placement with Explicit Origin Position and PCB Rotation Offset #5874

Improve CAD Model Placement with Explicit Origin Position and PCB Rotation Offset

Improve CAD Model Placement with Explicit Origin Position and PCB Rotation Offset #5874

Workflow file for this run

# 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:
matrix:
node: [1, 2, 3, 4]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.5
- name: Install dependencies
run: bun install
- name: Generate test plans
run: bun run scripts/generate-test-plan.ts
- name: Run tests for node ${{ matrix.node }}
run: |
if [ ! -f ".github/test-plans/node${{ matrix.node }}-testplan.txt" ]; then
echo "ERROR: No test plan found for node ${{ matrix.node }}"
exit 1
fi
mapfile -t test_files < .github/test-plans/node${{ matrix.node }}-testplan.txt
if [ ${#test_files[@]} -eq 0 ]; then
echo "ERROR: No test files in plan for node ${{ matrix.node }}"
exit 1
fi
echo "Running ${#test_files[@]} test files for node ${{ matrix.node }}"
attempt=1
while [ $attempt -le 4 ]; do
bun test ${test_files[@]} --timeout 30000
code=$?
if [ $code -eq 0 ]; then
break
fi
if [ $code -ne 139 ] && [ $code -ne 132 ]; then
exit $code
fi
if [ $attempt -eq 4 ]; then
echo "Segmentation fault or illegal instruction detected after $attempt attempts (exit=$code)."
exit $code
fi
attempt=$((attempt + 1))
echo "Segfault (139) or illegal instruction (132) detected, retrying ($attempt/4)..."
done
- name: Upload 3D Snapshot Artifacts on Failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: 3d-snapshots-node${{ matrix.node }}
path: |
tests/**/__snapshots__/*.diff.png
tests/**/__snapshots__/*.snap.png
if-no-files-found: ignore