Skip to content

chore(deps): update dependency uv_build to >=0.12.5,<0.13.0 #207

chore(deps): update dependency uv_build to >=0.12.5,<0.13.0

chore(deps): update dependency uv_build to >=0.12.5,<0.13.0 #207

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
env:
PYTHON_VERSION: "3.13"
jobs:
changes:
name: Detect Changes
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
python: ${{ steps.filter.outputs.python }}
versions: ${{ steps.filter.outputs.versions }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
python:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'uv.lock'
versions:
- 'pyproject.toml'
- 'src/cocosearch/__init__.py'
- '.claude-plugin/**'
skills-sync:
name: Skills Sync Check
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Check skills are in sync
run: |
diff -r skills/ src/cocosearch/skills/ \
--exclude=README.md --exclude=__init__.py --exclude=__pycache__ \
&& echo "Skills are in sync" \
|| { echo "::error::Skills out of sync. Run ./scripts/sync_skills.sh"; exit 1; }
lint:
name: Lint
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
# Pinned: `uvx ruff` is unversioned and resolves to the newest release, so
# 0.16.0 (2026-07-23) expanded the default rule set under us and turned
# Lint red on every PR. Keep in step with the dev-group cap in
# pyproject.toml so CI and local runs agree.
- name: Ruff check
run: uvx ruff@0.15.0 check src/ tests/
- name: Ruff format check
run: uvx ruff@0.15.0 format --check src/ tests/
validate-versions:
name: Validate Versions
needs: changes
if: needs.changes.outputs.versions == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Validate JSON files
run: |
jq empty .claude-plugin/plugin.json
jq empty .claude-plugin/marketplace.json
- name: Check version consistency
run: |
PYPROJECT_VERSION=$(grep -m1 '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
INIT_VERSION=$(grep '__version__' src/cocosearch/__init__.py | sed 's/__version__ = "\(.*\)"/\1/')
PLUGIN_VERSION=$(jq -r '.version' .claude-plugin/plugin.json)
MARKETPLACE_META=$(jq -r '.metadata.version' .claude-plugin/marketplace.json)
MARKETPLACE_PLUGIN=$(jq -r '.plugins[0].version' .claude-plugin/marketplace.json)
ERRORS=0
for pair in "INIT_VERSION:__init__.py" "PLUGIN_VERSION:plugin.json" "MARKETPLACE_META:marketplace.json metadata" "MARKETPLACE_PLUGIN:marketplace.json plugins[0]"; do
VAR="${pair%%:*}"; LABEL="${pair#*:}"
if [ "${!VAR}" != "$PYPROJECT_VERSION" ]; then
echo "::error::${LABEL} version (${!VAR}) != pyproject.toml (${PYPROJECT_VERSION})"
ERRORS=$((ERRORS + 1))
fi
done
[ $ERRORS -eq 0 ] && echo "All versions consistent: ${PYPROJECT_VERSION}" || exit 1
unit-tests:
name: Unit Tests
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore cached virtual environment
uses: actions/cache@v5
with:
path: .venv
key: venv-${{ runner.os }}-python-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock') }}
- name: Install dependencies
run: uv sync --frozen
- name: Run unit tests
run: uv run pytest