mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
## Summary Bumps all stale GitHub Actions to their latest stable versions across 7 workflow files. ### Changes | Workflow | Action | Old | New | |---|---|---|---| | `ci.yaml` | `astral-sh/setup-uv` | `@v8.0.0` / `@v7` (inline jobs only) | `@v8.1.0` | | `claude.yml` | `astral-sh/setup-uv` | `@v6` | `@v8.1.0` | | `codeflash-aiservice.yaml` | `astral-sh/setup-uv` | `@v7` | `@v8.1.0` | | `codeflash-js.yaml` | `astral-sh/setup-uv` | `@v7` | `@v8.1.0` | | `deploy_aiservice_to_azure.yml` | `astral-sh/setup-uv` | `@v7` | `@v8.1.0` | | `fix-formatting.yml` | `astral-sh/setup-uv` | `@v5` | `@v8.1.0` | | `fix-formatting.yml` | `j178/prek-action` | `@v1` | `@v2` | | `publish-to-pypi.yml` | `pypa/gh-action-pypi-publish` | `@master` | `@release/v1` | ### Notes - Shared workflow refs (`codeflash-ai/github-workflows/...@main`) in `ci.yaml` are **not** changed -- those follow `@main` and will pick up updates from the shared workflows repo. - `publish-to-pypi.yml` is currently disabled (`if: false`) but the ref is fixed anyway to avoid issues when re-enabled. ## Test plan - [ ] CI passes on this PR (the workflow files themselves are the change, so CI validates they parse correctly) - [ ] Verify `ci.yaml` shared workflow `uses:` lines still reference `@main`
80 lines
1.9 KiB
YAML
80 lines
1.9 KiB
YAML
name: Codeflash AiService
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "django/aiservice/**"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
checks: read
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: django/aiservice
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
check-changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should-run: ${{ steps.filter.outputs.aiservice }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: dorny/paths-filter@v4
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
aiservice:
|
|
- 'django/aiservice/**'
|
|
|
|
no-aiservice-changes:
|
|
name: No aiservice changes detected
|
|
needs: check-changes
|
|
if: needs.check-changes.outputs.should-run != 'true'
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
steps:
|
|
- name: Skip optimization
|
|
run: echo "Skipping codeflash optimization - no changes in django/aiservice/"
|
|
|
|
optimize:
|
|
needs: [check-changes]
|
|
if: needs.check-changes.outputs.should-run == 'true' && github.actor != 'codeflash-ai[bot]'
|
|
name: Optimize new code in this PR
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
|
|
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
DJANGO_SETTINGS_MODULE: aiservice.settings
|
|
COLUMNS: 110
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v8.1.0
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv sync
|
|
uv pip install git+https://github.com/codeflash-ai/codeflash@main
|
|
|
|
- name: Run Codeflash
|
|
run: uv run codeflash
|