From 8124150e34b2ddb340ff2f86543fa037db2b7e2d Mon Sep 17 00:00:00 2001 From: AJ Date: Wed, 1 Jul 2026 23:43:30 -0400 Subject: [PATCH] ci: add lint + test workflow (ruff check/format, pytest on py3.10 & 3.12) --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b2979dc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + name: Lint (ruff) + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python 3.12 + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install ruff + run: pip install ruff + + - name: ruff check + run: ruff check . + + - name: ruff format --check + run: ruff format --check . + + test: + runs-on: ubuntu-latest + name: Tests (py${{ matrix.python }}) + strategy: + fail-fast: false + matrix: + python: ["3.10", "3.12"] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + # bcc_core has no GUI imports, so the test suite needs no PySide6 — + # keeps CI fast and avoids Qt system-library headaches on the runner. + - name: Install test dependencies + run: pip install pytest + + - name: Run tests + run: python -m pytest -v