Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
c96010ab2This file is pinned to the selected release. Download the original to open it in your design tool.
name: CI
# The donor shipped `branches-ignore: [main, develop]`, so pushes straight to
# main ran nothing at all. Run on every push and every PR instead — the branch
# most worth testing is the one people ship from.
on:
push:
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env:
# No job may reach the network for parts data; the golden blocks pin every
# LCSC number, so the toolchain never needs the parts engine.
CIRCUIT_PARTS_ENGINE: "off"
jobs:
circuitpy:
name: pipeline
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the pinned toolchain
run: bash scripts/setup-toolchain.sh
- name: Install pytest
run: pip install pytest
- name: Run circuitpy tests
run: python -m pytest packages/circuitpy/tests -q
router:
name: routing contract
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pytest
run: pip install pytest
# No toolchain: routerlib reads DFM numbers and geometry primitives out of
# circuitpy as plain Python. The one test that needs kicad-cli skips.
# Run from the package so its pytest.ini supplies the import paths.
- name: Run routing contract, benchmark and scorer tests
working-directory: packages/router
run: python -m pytest -q
golden-blocks:
name: golden blocks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the pinned toolchain
run: bash scripts/setup-toolchain.sh
- name: Install pytest
run: pip install pytest
- name: Build every block and check its testbench
run: python -m pytest packages/golden-blocks/tests -q
viewer:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
- run: npm --prefix viewer ci
- run: npm --prefix viewer test
- run: npm --prefix viewer run build
skills:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pytest
run: pip install pytest
# `scripts/tests` rides along here because this job needs no toolchain
# and no numpy, so it is the one gate that is actually green. The scripts
# it covers grade the built corpus (part-terminals), and until now nothing
# ran their tests but a human remembering to.
- name: Run skill and script tests
run: python -m pytest skills/circuitcode/tests skills/parts-book/tests scripts/tests -q
evals:
name: structural evals
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
check-latest: true
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install the pinned toolchain
run: bash scripts/setup-toolchain.sh
# kicad-cli is what makes a packet shippable; without it the evals still
# run and simply assert the honest not-ready path.
- name: Install kicad-cli (best effort)
continue-on-error: true
run: |
sudo add-apt-repository --yes ppa:kicad/kicad-dev-nightly || true
sudo apt-get update && sudo apt-get install -y kicad-cli || \
echo "kicad-cli unavailable; evals will exercise the degraded path"
- name: Run structural evals
run: python evals/run.py