Skip to content

Commit be4c459

Browse files
committed
ci: upgrade action versions, add uv cache, fix broken paths, DRY publish
- Bump actions/checkout v4/v5 → v6, setup-node v4 → v6, setup-java v4 → v5, prek-action v1 → v2, github-script v6 → v7, aws-credentials v4 → v6, claude-code-action v1.0.89 → v1 - Add enable-cache: true to all astral-sh/setup-uv steps - Remove redundant uv venv --seed (uv sync creates venvs automatically) - Merge double uv sync steps in unit-tests into single conditional - Fix codeflash.yaml: broken path filter and working-directory - Consolidate duplicate publish jobs into a single matrix job - Remove generate_release_notes overridden by manual body
1 parent 153097b commit be4c459

6 files changed

Lines changed: 90 additions & 120 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
e2e_js: ${{ github.event_name != 'pull_request' || steps.check.outputs.e2e_js == 'true' }}
3939
e2e_java: ${{ github.event_name != 'pull_request' || steps.check.outputs.e2e_java == 'true' }}
4040
steps:
41-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
4242
if: github.event_name == 'pull_request'
4343
with:
4444
fetch-depth: 0
@@ -127,7 +127,7 @@ jobs:
127127
env:
128128
PYTHONIOENCODING: utf-8
129129
steps:
130-
- uses: actions/checkout@v4
130+
- uses: actions/checkout@v6
131131
with:
132132
fetch-depth: 1
133133
token: ${{ secrets.GITHUB_TOKEN }}
@@ -136,13 +136,15 @@ jobs:
136136
uses: astral-sh/setup-uv@v8.0.0
137137
with:
138138
python-version: ${{ matrix.python-version }}
139+
enable-cache: true
139140

140141
- name: Install dependencies
141-
run: uv sync
142-
143-
- name: Install test-only dependencies (Python 3.9 and 3.13)
144-
if: matrix.python-version == '3.9' || matrix.python-version == '3.13'
145-
run: uv sync --group tests
142+
run: |
143+
if [[ "${{ matrix.python-version }}" == "3.9" || "${{ matrix.python-version }}" == "3.13" ]]; then
144+
uv sync --group tests
145+
else
146+
uv sync
147+
fi
146148
147149
- name: Unit tests
148150
run: uv run pytest tests/
@@ -155,18 +157,18 @@ jobs:
155157
if: needs.determine-changes.outputs.type_check == 'true'
156158
runs-on: ubuntu-latest
157159
steps:
158-
- uses: actions/checkout@v4
160+
- uses: actions/checkout@v6
159161
with:
160162
fetch-depth: 1
161163
token: ${{ secrets.GITHUB_TOKEN }}
162164

163165
- name: Install uv
164166
uses: astral-sh/setup-uv@v8.0.0
167+
with:
168+
enable-cache: true
165169

166170
- name: Install dependencies
167-
run: |
168-
uv venv --seed
169-
uv sync
171+
run: uv sync
170172

171173
- name: Run mypy
172174
run: uv run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt
@@ -184,11 +186,13 @@ jobs:
184186
permissions:
185187
contents: write
186188
steps:
187-
- uses: actions/checkout@v4
189+
- uses: actions/checkout@v6
188190
with:
189191
ref: ${{ github.head_ref }}
190192
fetch-depth: 0
191193
- uses: astral-sh/setup-uv@v8.0.0
194+
with:
195+
enable-cache: true
192196

193197
- name: Auto-fix formatting
194198
run: |
@@ -204,7 +208,7 @@ jobs:
204208
git commit -m "style: auto-format with ruff"
205209
git push
206210
207-
- uses: j178/prek-action@v1
211+
- uses: j178/prek-action@v2
208212
with:
209213
extra-args: '--from-ref origin/${{ github.base_ref }} --to-ref HEAD'
210214

@@ -260,7 +264,7 @@ jobs:
260264
RETRY_DELAY: 5
261265
CODEFLASH_END_TO_END: 1
262266
steps:
263-
- uses: actions/checkout@v4
267+
- uses: actions/checkout@v6
264268
with:
265269
ref: ${{ github.event.pull_request.head.ref || '' }}
266270
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
@@ -280,6 +284,7 @@ jobs:
280284
uses: astral-sh/setup-uv@v8.0.0
281285
with:
282286
python-version: 3.11.6
287+
enable-cache: true
283288

284289
- name: Install dependencies
285290
run: uv sync
@@ -348,7 +353,7 @@ jobs:
348353
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
349354
CODEFLASH_END_TO_END: 1
350355
steps:
351-
- uses: actions/checkout@v4
356+
- uses: actions/checkout@v6
352357
with:
353358
ref: ${{ github.event.pull_request.head.ref || '' }}
354359
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
@@ -365,7 +370,7 @@ jobs:
365370
pr_state: ${{ github.event.pull_request.state }}
366371

367372
- name: Set up Node.js
368-
uses: actions/setup-node@v4
373+
uses: actions/setup-node@v6
369374
with:
370375
node-version: '20'
371376
cache: 'npm'
@@ -387,6 +392,7 @@ jobs:
387392
uses: astral-sh/setup-uv@v8.0.0
388393
with:
389394
python-version: 3.11.6
395+
enable-cache: true
390396

391397
- name: Install dependencies
392398
run: uv sync
@@ -427,7 +433,7 @@ jobs:
427433
EXPECTED_IMPROVEMENT_PCT: ${{ matrix.expected_improvement }}
428434
CODEFLASH_END_TO_END: 1
429435
steps:
430-
- uses: actions/checkout@v4
436+
- uses: actions/checkout@v6
431437
with:
432438
ref: ${{ github.event.pull_request.head.ref || '' }}
433439
repository: ${{ github.event.pull_request.head.repo.full_name || '' }}
@@ -444,7 +450,7 @@ jobs:
444450
pr_state: ${{ github.event.pull_request.state }}
445451

446452
- name: Set up JDK 11
447-
uses: actions/setup-java@v4
453+
uses: actions/setup-java@v5
448454
with:
449455
java-version: '11'
450456
distribution: 'temurin'
@@ -454,6 +460,7 @@ jobs:
454460
uses: astral-sh/setup-uv@v8.0.0
455461
with:
456462
python-version: 3.11.6
463+
enable-cache: true
457464

458465
- name: Install dependencies
459466
run: uv sync

.github/workflows/claude.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,28 @@ jobs:
5151
actions: read
5252
steps:
5353
- name: Checkout repository
54-
uses: actions/checkout@v4
54+
uses: actions/checkout@v6
5555
with:
5656
fetch-depth: 0
5757
ref: ${{ github.event.pull_request.head.ref || github.ref }}
5858

5959
- name: Install uv
6060
uses: astral-sh/setup-uv@v8.0.0
61+
with:
62+
enable-cache: true
6163

6264
- name: Install dependencies
63-
run: |
64-
uv venv --seed
65-
uv sync
65+
run: uv sync
6666

6767
- name: Configure AWS Credentials
68-
uses: aws-actions/configure-aws-credentials@v4
68+
uses: aws-actions/configure-aws-credentials@v6
6969
with:
7070
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
7171
aws-region: ${{ secrets.AWS_REGION }}
7272

7373
- name: Run Claude Code
7474
id: claude
75-
uses: anthropics/claude-code-action@v1.0.89
75+
uses: anthropics/claude-code-action@v1
7676
with:
7777
use_bedrock: "true"
7878
use_sticky_comment: true
@@ -311,28 +311,28 @@ jobs:
311311
fi
312312
313313
- name: Checkout repository
314-
uses: actions/checkout@v4
314+
uses: actions/checkout@v6
315315
with:
316316
fetch-depth: 0
317317
ref: ${{ steps.pr-ref.outputs.ref }}
318318

319319
- name: Install uv
320320
uses: astral-sh/setup-uv@v8.0.0
321+
with:
322+
enable-cache: true
321323

322324
- name: Install dependencies
323-
run: |
324-
uv venv --seed
325-
uv sync
325+
run: uv sync
326326

327327
- name: Configure AWS Credentials
328-
uses: aws-actions/configure-aws-credentials@v4
328+
uses: aws-actions/configure-aws-credentials@v6
329329
with:
330330
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
331331
aws-region: ${{ secrets.AWS_REGION }}
332332

333333
- name: Run Claude Code
334334
id: claude
335-
uses: anthropics/claude-code-action@v1.0.89
335+
uses: anthropics/claude-code-action@v1
336336
with:
337337
use_bedrock: "true"
338338
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*)"'

.github/workflows/codeflash-optimize.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ jobs:
2626
COLUMNS: 110
2727
steps:
2828
- name: 🛎️ Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232

3333
- name: 🐍 Set up Python 3.11 for CLI
3434
uses: astral-sh/setup-uv@v8.0.0
3535
with:
3636
python-version: 3.11.6
37+
enable-cache: true
3738

3839
- name: 📦 Install dependencies (CLI)
3940
run: |

.github/workflows/codeflash.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
paths:
66
# So that this workflow only runs when code within the target module is modified
7-
- 'code_to_optimize_js_esm/**'
7+
- 'code_to_optimize/js/code_to_optimize_js_esm/**'
88
workflow_dispatch:
99

1010
concurrency:
@@ -23,19 +23,20 @@ jobs:
2323
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
2424
defaults:
2525
run:
26-
working-directory: ./code_to_optimize_js_esm
26+
working-directory: ./code_to_optimize/js/code_to_optimize_js_esm
2727
steps:
2828
- name: 🛎️ Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
fetch-depth: 0
3232
- name: 🟢 Setup Node.js
33-
uses: actions/setup-node@v4
33+
uses: actions/setup-node@v6
3434
with:
3535
node-version: '22'
3636
cache: 'npm'
37+
cache-dependency-path: code_to_optimize/js/code_to_optimize_js_esm/package-lock.json
3738
- name: 📦 Install Dependencies
3839
run: npm ci
39-
40+
4041
- name: ⚡️ Codeflash Optimization
4142
run: npx codeflash

.github/workflows/label-workflow-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
pull-requests: write
1414
steps:
1515
- name: Label PR with workflow changes
16-
uses: actions/github-script@v6
16+
uses: actions/github-script@v7
1717
with:
1818
script: |
1919
const labelName = 'workflow-modified';

0 commit comments

Comments
 (0)