File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Codeflash
2+
3+ on :
4+ pull_request :
5+ paths :
6+ # So that this workflow only runs when code within the target module is modified
7+ - ' code_to_optimize_js_esm/**'
8+ workflow_dispatch :
9+
10+ concurrency :
11+ # Any new push to the PR will cancel the previous run, so that only the latest code is optimized
12+ group : ${{ github.workflow }}-${{ github.ref }}
13+ cancel-in-progress : true
14+
15+
16+ jobs :
17+ optimize :
18+ name : Optimize new code
19+ # Don't run codeflash on codeflash-ai[bot] commits, prevent duplicate optimizations
20+ if : ${{ github.actor != 'codeflash-ai[bot]' }}
21+ runs-on : ubuntu-latest
22+ env :
23+ CODEFLASH_API_KEY : ${{ secrets.CODEFLASH_API_KEY }}
24+ defaults :
25+ run :
26+ working-directory : ./code_to_optimize_js_esm
27+ steps :
28+ - name : 🛎️ Checkout
29+ uses : actions/checkout@v4
30+ with :
31+ fetch-depth : 0
32+ - name : 🟢 Setup Node.js
33+ uses : actions/setup-node@v4
34+ with :
35+ node-version : ' 22'
36+ cache : ' npm'
37+ - name : 📦 Install Dependencies
38+ run : npm ci
39+
40+ - name : ⚡️ Codeflash Optimization
41+ run : npx codeflash
You can’t perform that action at this time.
0 commit comments