From 0ee64bfc85394506d5852d10f0e1ec8d999edb50 Mon Sep 17 00:00:00 2001 From: Ming-Jer Lee Date: Wed, 31 Dec 2025 05:31:39 -0800 Subject: [PATCH 1/2] feat: Add CI workflow for linting and testing on PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a separate CI workflow that runs on pushes to main and PRs: - Lint and format checks (ruff) - Tests across Python 3.10-3.13 This catches issues early before the publish workflow runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 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..cb8c5e1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint: + name: Lint & Format + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install uv + run: pip install uv + + - name: Install dependencies + run: uv sync + + - name: Run linting + run: uv run ruff check . + + - name: Run formatting check + run: uv run ruff format --check . + + test: + name: Test (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12', '3.13'] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + run: pip install uv + + - name: Install dependencies + run: | + uv sync + uv pip install -e ".[dev]" + + - name: Run tests + run: uv run pytest tests/ -v --cov=src/clgraph --cov-report=term-missing From 5a10d9cbdd2c711964e749bd2d28d0e87d092e11 Mon Sep 17 00:00:00 2001 From: Ming-Jer Lee Date: Wed, 31 Dec 2025 05:32:54 -0800 Subject: [PATCH 2/2] fix: Install dev dependencies in CI lint job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit uv sync alone doesn't install optional dev dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb8c5e1..bf004cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,9 @@ jobs: run: pip install uv - name: Install dependencies - run: uv sync + run: | + uv sync + uv pip install -e ".[dev]" - name: Run linting run: uv run ruff check .