Skip to content
Merged
Changes from 1 commit
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
20 changes: 20 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,23 @@ jobs:

- name: Test stdlib builds
run: pcb build stdlib

- name: Checkout kicad-test-fixtures
uses: actions/checkout@v5
with:
repository: diodeinc/kicad-test-fixtures
token: ${{ secrets.DIODE_ROBOT_TOKEN }}
path: kicad-test-fixtures

- name: Test pcb import (E2E)
run: |
pcb new --workspace test-import --repo github.com/test/test-import
find kicad-test-fixtures -name '*.kicad_pro' | while IFS= read -r pro; do
echo "=== Importing $pro ==="
pcb import "$pro" ./test-import
done
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipeline while loop may silently swallow import failures

Medium Severity

The find ... | while read pattern runs the while loop in a subshell. While GitHub Actions uses set -eo pipefail, set -e behavior inside a while loop body running in a pipeline subshell is historically inconsistent across bash versions and can silently continue past a failing pcb import without aborting the step. Since this is a test meant to catch import failures, a silently passing step defeats its purpose. Using find -exec or a for loop over a glob (or adding || exit 1 after the pcb import call) would reliably propagate errors.

Fix in Cursor Fix in Web

for board_dir in ./test-import/boards/*/; do
board=$(basename "$board_dir")
echo "=== Layout $board ==="
pcb layout "./test-import/boards/$board/$board.zen" --no-open
done
Loading