Loading files
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
# ---------------------------------------------------------------------------
# Unit / fixture matrix — zero runtime deps; tests use the [dev] extra.
# OS {ubuntu, macos, windows} x Python {3.11, 3.12, 3.13}
# ---------------------------------------------------------------------------
test:
name: test (${{ matrix.os }} / py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install (dev extra)
run: python -m pip install -e ".[dev]"
- name: Run tests
run: python -m pytest -q
# ---------------------------------------------------------------------------
# akcli --help smoke from a clean checkout + bin wrapper executable bit
# + hooks.json validity (jq). Unix only (bash wrapper).
# ---------------------------------------------------------------------------
cli-smoke:
name: cli smoke + hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: jq . hooks/hooks.json
run: jq . hooks/hooks.json
- name: bin/akcli is executable
run: test -x bin/akcli
- name: akcli --help (clean checkout, no install)
run: ./bin/akcli --help
- name: akcli --version
run: ./bin/akcli --version
# ---------------------------------------------------------------------------
# Packaging: build + twine check; version-sync drift check.
# ---------------------------------------------------------------------------
packaging:
name: build + twine check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build tooling
run: python -m pip install build twine
- name: Build sdist + wheel
run: python -m build
- name: twine check
run: twine check dist/*
- name: Version sync drift check
run: python tools/sync_version.py --check
# ---------------------------------------------------------------------------
# Claude Code plugin + marketplace validation.
# ---------------------------------------------------------------------------
plugin-validate:
name: plugin validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Claude Code CLI
run: npm install -g @anthropic-ai/claude-code
- name: Validate marketplace (strict)
run: claude plugin validate . --strict
- name: Validate plugin component (tree minus marketplace.json)
run: |
set -euo pipefail
tmp="$(mktemp -d)"
cp -R . "$tmp/plugin"
rm -f "$tmp/plugin/.claude-plugin/marketplace.json"
claude plugin validate "$tmp/plugin"
# ---------------------------------------------------------------------------
# KiCad 10.x present — optional secondary kicad-cli verify path. Ubuntu only.
# ---------------------------------------------------------------------------
kicad-cli:
name: kicad-cli (ubuntu + KiCad 10)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install pinned KiCad 10.x
run: |
set -euo pipefail
sudo add-apt-repository --yes ppa:kicad/kicad-10.0-releases
sudo apt-get update
sudo apt-get install --yes --no-install-recommends kicad
- name: kicad-cli version
run: kicad-cli version
- name: Install (dev extra)
run: python -m pip install -e ".[dev]"
- name: Run tests with kicad-cli available
run: python -m pytest -q
# ---------------------------------------------------------------------------
# Graceful degradation when kicad-cli is absent (primary path is pure Python).
# ---------------------------------------------------------------------------
no-kicad-cli:
name: no kicad-cli degradation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Confirm kicad-cli absent
run: |
if command -v kicad-cli >/dev/null 2>&1; then
echo "kicad-cli unexpectedly present" >&2; exit 1
fi
echo "kicad-cli absent — exercising pure-Python degradation path"
- name: Install (dev extra)
run: python -m pip install -e ".[dev]"
- name: Run tests without kicad-cli
run: python -m pytest -q
476328a26This file is pinned to the selected release. Download the original to open it in your design tool.