Adopt shared CI workflow (#21)

Replace packages-ci.yml and github-app-tests.yml with a single
ci.yml that calls the shared ci-python-uv reusable workflow.
Lint, typecheck, and test run as parallel jobs. Version check
stays local (needs fetch-depth: 0 + PR-only conditional).
This commit is contained in:
Kevin Turcios 2026-04-15 02:36:17 -05:00 committed by GitHub
parent 7d86202524
commit a1710f7f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 38 additions and 102 deletions

38
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,38 @@
name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
ci:
uses: codeflash-ai/github-workflows/.github/workflows/ci-python-uv.yml@main
with:
lint-command: "uv run ruff check && uv run ruff format --check"
typecheck-command: >-
uv run interrogate packages/codeflash-core/src/ packages/codeflash-python/src/ &&
uv run mypy packages/codeflash-core/src/ packages/codeflash-python/src/
test-command: "uv run pytest packages/ -v"
test-env: '{"CI": "true"}'
version:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v8.0.0
with:
python-version: "3.12"
enable-cache: true
- run: uv sync --all-packages
- name: Check version bump
run: uv run python scripts/versioning.py check-version

View file

@ -1,39 +0,0 @@
name: GitHub App Tests
on:
pull_request:
paths:
- "packages/github-app/**"
push:
branches: [main, main-teammate]
paths:
- "packages/github-app/**"
jobs:
test:
runs-on: ubuntu-latest
concurrency:
group: github-app-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
working-directory: packages/github-app
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 uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --dev
- name: Run tests
run: uv run pytest -v

View file

@ -1,63 +0,0 @@
name: Packages CI
on:
pull_request:
paths:
- "packages/codeflash-core/**"
- "packages/codeflash-python/**"
- "pyproject.toml"
- "uv.lock"
push:
branches: [main]
paths:
- "packages/codeflash-core/**"
- "packages/codeflash-python/**"
- "pyproject.toml"
- "uv.lock"
jobs:
check:
runs-on: ubuntu-latest
concurrency:
group: packages-ci-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for version check against origin/main
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: uv sync --all-packages
- name: Ruff check
run: uv run ruff check packages/
- name: Ruff format
run: uv run ruff format --check packages/
- name: Interrogate
run: uv run interrogate packages/codeflash-core/src/ packages/codeflash-python/src/
- name: Mypy
run: uv run mypy packages/codeflash-core/src/ packages/codeflash-python/src/
- name: Pytest
run: uv run pytest packages/ -v
env:
CI: "true"
- name: Check version bump
if: github.event_name == 'pull_request'
run: uv run python scripts/versioning.py check-version