Remove old CI workflow files (consolidated into ci.yaml) (#2616)

Delete 7 separate workflow files now replaced by the unified ci.yaml:
aiservice-ci.yml, cf-api-tests.yaml, cf-webapp-quality-gates.yml,
end-to-end-tests.yaml, nextjs-build.yaml, prek.yaml,
vscode-extension-build.yml
This commit is contained in:
Kevin Turcios 2026-04-23 05:32:30 -05:00 committed by GitHub
parent cf28fa6299
commit 72cb04ead1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 0 additions and 695 deletions

View file

@ -1,52 +0,0 @@
name: AI Service CI
on:
push:
branches: [main]
paths:
- "django/aiservice/**"
- ".github/workflows/aiservice-ci.yml"
pull_request:
paths:
- "django/aiservice/**"
- ".github/workflows/aiservice-ci.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Typecheck via shared workflow (mypy doesn't need secrets).
typecheck:
uses: codeflash-ai/github-workflows/.github/workflows/ci-python-uv.yml@main
with:
working-directory: "django/aiservice"
sync-command: "uv sync"
typecheck-command: "uv run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt"
# Test locally (pytest needs secrets as env vars).
test:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: django/aiservice
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
OPENAI_API_VERSION: ${{ secrets.OPENAI_API_VERSION }}
ANTHROPIC_FOUNDRY_API_KEY: ${{ secrets.ANTHROPIC_FOUNDRY_API_KEY }}
ANTHROPIC_FOUNDRY_BASE_URL: ${{ secrets.ANTHROPIC_FOUNDRY_BASE_URL }}
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v8.0.0
with:
python-version: "3.12"
enable-cache: true
- run: uv sync
- name: Test
run: uv run pytest

View file

@ -1,93 +0,0 @@
name: CF-API CI
permissions:
contents: read
pull-requests: read
on:
pull_request:
paths:
- 'js/cf-api/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# This job checks if the workflow should run based on file changes
check-changes:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.cfapi }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
cfapi:
- 'js/cf-api/**'
# This job always runs and succeeds, allowing PRs to be merged when paths don't match
skip-validate:
needs: check-changes
if: needs.check-changes.outputs.should-run != 'true'
runs-on: ubuntu-latest
steps:
- name: Skip validation
run: echo "Skipping CF-API validation - no changes in js/cf-api/"
validate:
needs: check-changes
if: needs.check-changes.outputs.should-run == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
registry-url: https://npm.pkg.github.com
scope: '@codeflash-ai'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
working-directory: js
run: pnpm install --frozen-lockfile
- name: Build common package
working-directory: js
run: pnpm --filter @codeflash-ai/common build
- name: Run tests
working-directory: js/cf-api
run: NODE_OPTIONS=--experimental-vm-modules pnpm jest --ci --config jest.config.cjs
- name: Build
working-directory: js/cf-api
run: pnpm build
# - name: Type check
# run: |
# cd js/cf-api
# npx tsc --noEmit
#
# - name: Lint
# run: |
# cd js/cf-api
# npx eslint . --ext .ts,.mjs

View file

@ -1,170 +0,0 @@
name: cf-webapp Quality Gates
on:
pull_request:
paths:
- "js/cf-webapp/**"
permissions:
contents: read
packages: read
pull-requests: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.webapp }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
webapp:
- 'js/cf-webapp/**'
skip:
needs: check-changes
if: needs.check-changes.outputs.should-run != 'true'
runs-on: ubuntu-latest
steps:
- run: echo "No cf-webapp changes, skipping."
benchmark:
needs: check-changes
if: needs.check-changes.outputs.should-run == 'true'
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "20"
registry-url: https://npm.pkg.github.com
scope: "@codeflash-ai"
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Restore WASM artifacts cache
uses: actions/cache@v5
with:
path: |
js/cf-webapp/public/web-tree-sitter.wasm
js/cf-webapp/public/tree-sitter-python.wasm
js/cf-webapp/public/.tree-sitter-python-version
key: wasm-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}
- name: Install dependencies
working-directory: js
run: pnpm install --frozen-lockfile
- name: Build common package
working-directory: js
run: pnpm --filter @codeflash-ai/common build
- name: Generate Prisma client for cf-webapp
working-directory: js/cf-webapp
run: pnpm prisma generate
- name: Restore Next.js build cache
uses: actions/cache@v5
with:
path: js/cf-webapp/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}-${{ hashFiles('js/cf-webapp/src/**') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}-
nextjs-${{ runner.os }}-
- name: Type-check
id: typecheck
working-directory: js/cf-webapp
run: pnpm tsc --noEmit
continue-on-error: true
- name: Tests
id: tests
working-directory: js/cf-webapp
run: pnpm vitest run --reporter=verbose 2>&1 | tee test-output.txt
continue-on-error: true
- name: Build
id: build
working-directory: js/cf-webapp
run: pnpm next build 2>&1 | tee build-output.txt
continue-on-error: true
- name: Extract results
id: results
working-directory: js/cf-webapp
run: |
# Type-check status
if [ "${{ steps.typecheck.outcome }}" = "success" ]; then
echo "typecheck_status=✅ Pass" >> "$GITHUB_OUTPUT"
else
echo "typecheck_status=❌ Fail" >> "$GITHUB_OUTPUT"
fi
# Test summary
if [ "${{ steps.tests.outcome }}" = "success" ]; then
TESTS_SUMMARY=$(grep -E "Tests\s+[0-9]+" test-output.txt | tail -1 || echo "passed")
echo "tests_status=✅ ${TESTS_SUMMARY}" >> "$GITHUB_OUTPUT"
else
echo "tests_status=❌ Tests failed" >> "$GITHUB_OUTPUT"
fi
# Build status
if [ "${{ steps.build.outcome }}" = "success" ]; then
echo "build_status=✅ Success" >> "$GITHUB_OUTPUT"
else
echo "build_status=❌ Fail" >> "$GITHUB_OUTPUT"
fi
# Extract route sizes from build output
ROUTES=$(sed -n '/Route.*Size.*First Load/,/^$/p' build-output.txt | head -30 || echo "No route data")
{
echo "routes<<ROUTES_EOF"
echo "$ROUTES"
echo "ROUTES_EOF"
} >> "$GITHUB_OUTPUT"
- name: Post PR comment
if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr comment ${{ github.event.pull_request.number }} \
--repo ${{ github.repository }} \
--body "$(cat <<'COMMENT_EOF'
## cf-webapp Quality Report
| Check | Result |
|-------|--------|
| Type-check | ${{ steps.results.outputs.typecheck_status }} |
| Tests | ${{ steps.results.outputs.tests_status }} |
| Build | ${{ steps.results.outputs.build_status }} |
<details>
<summary>Route Sizes</summary>
```
${{ steps.results.outputs.routes }}
```
</details>
COMMENT_EOF
)"
- name: Fail if any check failed
if: steps.typecheck.outcome == 'failure' || steps.tests.outcome == 'failure' || steps.build.outcome == 'failure'
run: exit 1

View file

@ -1,211 +0,0 @@
name: end-to-end-tests
on:
pull_request:
workflow_run:
workflows: ["django-unit-tests"]
types:
- completed
branches: [main]
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
check-changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
should_run: ${{ steps.filter.outputs.relevant == 'true' || github.event_name == 'workflow_dispatch' }}
aiservice_changed: ${{ steps.filter.outputs.aiservice == 'true' }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check which projects changed
uses: dorny/paths-filter@v4
id: filter
with:
filters: |
relevant:
- 'django/aiservice/**'
- 'cli/**'
- '.github/workflows/end-to-end-tests.yaml'
aiservice:
- 'django/aiservice/**'
no-changes-detected:
name: No relevant changes detected
needs: check-changes
if: ${{ github.event_name == 'pull_request' && needs.check-changes.outputs.should_run != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Skip test
run: echo "No relevant changes detected, skipping end-to-end tests"
- name: Mark as success
run: exit 0
unit-tests-check:
name: Wait for unit tests
needs: [check-changes]
if: ${{ github.event_name == 'pull_request' && needs.check-changes.outputs.aiservice_changed == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
checks: read
steps:
- uses: actions/checkout@v6
- name: Wait for unit tests to pass
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: 'unit-tests'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
e2e-test:
name: ${{ matrix.name }}
needs: [check-changes, unit-tests-check]
if: |
always() &&
(needs.unit-tests-check.result == 'success' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') ||
github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: bubblesort-pytest-no-git
script: end_to_end_test_bubblesort_pytest.py
expected_improvement: 70
remove_git: true
- name: bubblesort-unittest
script: end_to_end_test_bubblesort_unittest.py
expected_improvement: 40
- name: coverage
script: end_to_end_test_coverage.py
expected_improvement: 10
extra_deps: black
- name: futurehouse
script: end_to_end_test_futurehouse.py
expected_improvement: 10
- name: init-optimization
script: end_to_end_test_init_optimization.py
expected_improvement: 10
- name: tracer-replay
script: end_to_end_test_tracer_replay.py
expected_improvement: 10
- name: topological-sort
script: end_to_end_test_topological_sort_worktree.py
expected_improvement: 5
env:
CODEFLASH_AIS_SERVER: local
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
OPENAI_API_VERSION: ${{ secrets.OPENAI_API_VERSION }}
ANTHROPIC_FOUNDRY_API_KEY: ${{ secrets.ANTHROPIC_FOUNDRY_API_KEY }}
ANTHROPIC_FOUNDRY_BASE_URL: ${{ secrets.ANTHROPIC_FOUNDRY_BASE_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
COLUMNS: 110
MAX_RETRIES: 3
RETRY_DELAY: 5
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
CODEFLASH_END_TO_END: 1
steps:
- name: Check out codeflash-internal repo
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.12 for AI Server
uses: astral-sh/setup-uv@v7
with:
python-version: "3.12"
- name: Install dependencies for Django server
run: |
cd ./django/aiservice
uv sync
- name: Start Django server
run: |
cd ./django/aiservice
uv run uvicorn aiservice.asgi:application --host localhost --port 8000 >> server.log 2>&1 &
- name: Remove .git
if: ${{ matrix.remove_git == true }}
run: |
if [ -d ".git" ]; then
echo ".git directory exists!"
sudo rm -rf .git
if [ -d ".git" ]; then
echo ".git directory still exists after removal attempt!"
exit 1
else
echo ".git directory successfully removed."
fi
else
echo ".git directory does not exist. Nothing to remove."
exit 1
fi
- name: Clone codeflash repo
run: |
cd ..
git clone https://github.com/codeflash-ai/codeflash.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python 3.11 for CLI
uses: actions/setup-python@v5
with:
python-version: "3.11.6"
- name: Install dependencies (CLI)
run: |
cd ../codeflash
uv sync
uv add sqlalchemy ${{ matrix.extra_deps }}
- name: Run Codeflash to optimize code
id: optimize_code
run: |
cd ../codeflash
uv run python tests/scripts/${{ matrix.script }}
- name: Display AI Server logs
if: always()
run: |
cd ./django/aiservice
cat server.log
e2e-status:
name: E2E Tests Status
runs-on: ubuntu-latest
needs: [check-changes, no-changes-detected, unit-tests-check, e2e-test]
if: always()
steps:
- name: Check all job statuses
run: |
if [[ "${{ needs.e2e-test.result }}" == "success" ]] || \
[[ "${{ needs.e2e-test.result }}" == "skipped" ]] || \
[[ "${{ needs.no-changes-detected.result }}" == "success" ]]; then
echo "✓ End-to-end tests workflow completed successfully"
exit 0
else
echo "✗ End-to-end tests workflow failed"
echo "no-changes-detected: ${{ needs.no-changes-detected.result }}"
echo "unit-tests-check: ${{ needs.unit-tests-check.result }}"
echo "e2e-test: ${{ needs.e2e-test.result }}"
exit 1
fi

View file

@ -1,88 +0,0 @@
name: Next.js Build Check
on:
pull_request:
paths:
- 'js/cf-webapp/**'
permissions:
contents: read
pull-requests: read
jobs:
# This job checks if the workflow should run based on file changes
check-changes:
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.filter.outputs.webapp }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
webapp:
- 'js/cf-webapp/**'
# This job always runs and succeeds, allowing PRs to be merged when paths don't match
skip-build:
needs: check-changes
if: needs.check-changes.outputs.should-run != 'true'
runs-on: ubuntu-latest
steps:
- name: Skip build
run: echo "Skipping Next.js build - no changes in js/cf-webapp/"
build:
needs: check-changes
if: needs.check-changes.outputs.should-run == 'true'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20'
registry-url: https://npm.pkg.github.com
scope: '@codeflash-ai'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Restore WASM artifacts cache
uses: actions/cache@v5
with:
path: |
js/cf-webapp/public/web-tree-sitter.wasm
js/cf-webapp/public/tree-sitter-python.wasm
js/cf-webapp/public/.tree-sitter-python-version
key: wasm-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}
- name: Install dependencies
working-directory: js
run: pnpm install --frozen-lockfile
- name: Restore Next.js build cache
uses: actions/cache@v5
with:
path: js/cf-webapp/.next/cache
key: nextjs-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}-${{ hashFiles('js/cf-webapp/src/**') }}
restore-keys: |
nextjs-${{ runner.os }}-${{ hashFiles('js/pnpm-lock.yaml') }}-
nextjs-${{ runner.os }}-
- name: Build Next.js app
working-directory: js
run: pnpm --filter cf-webapp build

View file

@ -1,15 +0,0 @@
name: Prek (pre-commit checks) checks
on: [pull_request]
jobs:
prek:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v5
- uses: j178/prek-action@v1
with:
extra-args: '--from-ref origin/${{ github.base_ref }} --to-ref ${{ github.sha }}'

View file

@ -1,66 +0,0 @@
name: Build VSCode Extension
on:
pull_request:
paths:
- 'js/VSC-Extension/**'
workflow_dispatch:
jobs:
check-min-version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Extract MIN_CODEFLASH_VERSION from constants file
id: extract-version
run: |
FILE="js/VSC-Extension/src/constants/cf_min_version.ts"
VERSION=$(grep -oP 'MIN_CODEFLASH_VERSION\s*=\s*"\K[^"]+' $FILE)
if [ -z "$VERSION" ]; then
echo "❌ Could not find MIN_CODEFLASH_VERSION in $FILE"
exit 1
fi
echo "✅ Found MIN_CODEFLASH_VERSION=$VERSION"
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check version exists on PyPI
run: |
# Check if this version exists on PyPI
VERSION="${{ steps.extract-version.outputs.version }}"
if pip index versions codeflash | grep -q "Available versions: .*$VERSION"; then
echo "✅ Version $VERSION exists on PyPI."
else
echo "❌ Version $VERSION not found on PyPI"
exit 1
fi
build:
runs-on: ubuntu-latest
needs: check-min-version
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Use Node.js v20
uses: actions/setup-node@v6
with:
node-version: 20
cache: "npm"
cache-dependency-path: js/VSC-Extension/package-lock.json
- name: Install dependencies
working-directory: js/VSC-Extension
run: npm ci
- name: Package VSCode Extension
working-directory: js/VSC-Extension
run: npm run vsce
- name: Upload VSIX artifact
uses: actions/upload-artifact@v7
with:
name: vscode-extension
path: js/VSC-Extension/*.vsix