Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 25 additions & 18 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
e2e_js: ${{ github.event_name != 'pull_request' || steps.check.outputs.e2e_js == 'true' }}
e2e_java: ${{ github.event_name != 'pull_request' || steps.check.outputs.e2e_java == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
if: github.event_name == 'pull_request'
with:
fetch-depth: 0
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
env:
PYTHONIOENCODING: utf-8
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -136,13 +136,15 @@ jobs:
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: uv sync

- name: Install test-only dependencies (Python 3.9 and 3.13)
if: matrix.python-version == '3.9' || matrix.python-version == '3.13'
run: uv sync --group tests
run: |
if [[ "${{ matrix.python-version }}" == "3.9" || "${{ matrix.python-version }}" == "3.13" ]]; then
uv sync --group tests
else
uv sync
fi

- name: Unit tests
run: uv run pytest tests/
Expand All @@ -155,18 +157,18 @@ jobs:
if: needs.determine-changes.outputs.type_check == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 1
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

- name: Install dependencies
run: |
uv venv --seed
uv sync
run: uv sync

- name: Run mypy
run: uv run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt
Expand All @@ -184,11 +186,13 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

- name: Auto-fix formatting
run: |
Expand All @@ -204,7 +208,7 @@ jobs:
git commit -m "style: auto-format with ruff"
git push

- uses: j178/prek-action@v1
- uses: j178/prek-action@v2
with:
extra-args: '--from-ref origin/${{ github.base_ref }} --to-ref HEAD'

Expand Down Expand Up @@ -260,7 +264,7 @@ jobs:
RETRY_DELAY: 5
CODEFLASH_END_TO_END: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref || '' }}
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
Expand All @@ -280,6 +284,7 @@ jobs:
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: 3.11.6
enable-cache: true

- name: Install dependencies
run: uv sync
Expand Down Expand Up @@ -348,7 +353,7 @@ jobs:
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
CODEFLASH_END_TO_END: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref || '' }}
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
Expand All @@ -365,7 +370,7 @@ jobs:
pr_state: ${{ github.event.pull_request.state }}

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'npm'
Expand All @@ -387,6 +392,7 @@ jobs:
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: 3.11.6
enable-cache: true

- name: Install dependencies
run: uv sync
Expand Down Expand Up @@ -427,7 +433,7 @@ jobs:
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
CODEFLASH_END_TO_END: 1
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref || '' }}
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
Expand All @@ -444,7 +450,7 @@ jobs:
pr_state: ${{ github.event.pull_request.state }}

- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
java-version: '11'
distribution: 'temurin'
Expand All @@ -454,6 +460,7 @@ jobs:
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: 3.11.6
enable-cache: true

- name: Install dependencies
run: uv sync
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/claude.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,30 @@ jobs:
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

- name: Install dependencies
run: |
uv venv --seed
uv sync

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1.0.89
uses: anthropics/claude-code-action@v1
with:
use_bedrock: "true"
use_sticky_comment: true
Expand Down Expand Up @@ -311,28 +313,30 @@ jobs:
fi

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ steps.pr-ref.outputs.ref }}

- name: Install uv
uses: astral-sh/setup-uv@v8.0.0
with:
enable-cache: true

- name: Install dependencies
run: |
uv venv --seed
uv sync

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1.0.89
uses: anthropics/claude-code-action@v1
with:
use_bedrock: "true"
claude_args: '--model us.anthropic.claude-sonnet-4-6 --allowedTools "Read,Edit,Write,Glob,Grep,Bash(git status*),Bash(git diff*),Bash(git add *),Bash(git commit *),Bash(git push*),Bash(git log*),Bash(git merge*),Bash(git fetch*),Bash(git checkout*),Bash(git branch*),Bash(uv run prek *),Bash(prek *),Bash(uv run ruff *),Bash(uv run pytest *),Bash(uv run mypy *),Bash(uv run coverage *),Bash(gh pr comment*),Bash(gh pr view*),Bash(gh pr diff*),Bash(gh pr merge*),Bash(gh pr close*)"'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codeflash-optimize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
COLUMNS: 110
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: 🐍 Set up Python 3.11 for CLI
uses: astral-sh/setup-uv@v8.0.0
with:
python-version: 3.11.6
enable-cache: true

- name: 📦 Install dependencies (CLI)
run: |
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/codeflash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
paths:
# So that this workflow only runs when code within the target module is modified
- 'code_to_optimize_js_esm/**'
- 'code_to_optimize/js/code_to_optimize_js_esm/**'
workflow_dispatch:

concurrency:
Expand All @@ -23,19 +23,20 @@ jobs:
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
defaults:
run:
working-directory: ./code_to_optimize_js_esm
working-directory: ./code_to_optimize/js/code_to_optimize_js_esm
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 🟢 Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: code_to_optimize/js/code_to_optimize_js_esm/package-lock.json
- name: 📦 Install Dependencies
run: npm ci

- name: ⚡️ Codeflash Optimization
run: npx codeflash
2 changes: 1 addition & 1 deletion .github/workflows/label-workflow-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pull-requests: write
steps:
- name: Label PR with workflow changes
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const labelName = 'workflow-modified';
Expand Down
Loading
Loading