File tree Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Expand file tree Collapse file tree 2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CodeFlash
2+
3+ on :
4+ pull_request :
5+ paths :
6+ - " **"
7+ workflow_dispatch :
8+
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ jobs :
14+ optimize :
15+ name : Optimize new code in this PR
16+ if : ${{ github.actor != 'codeflash-ai[bot]' }}
17+ runs-on : ubuntu-latest
18+ env :
19+ CODEFLASH_AIS_SERVER : prod
20+ POSTHOG_API_KEY : ${{ secrets.POSTHOG_API_KEY }}
21+ CODEFLASH_API_KEY : ${{ secrets.CODEFLASH_API_KEY }}
22+ CODEFLASH_PR_NUMBER : ${{ github.event.number }}
23+ COLUMNS : 110
24+ steps :
25+ - uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0
28+
29+ - name : Set up Python 3.11 for CLI
30+ uses : astral-sh/setup-uv@v5
31+ with :
32+ python-version : 3.11.6
33+
34+ - name : Install dependencies (CLI)
35+ run : |
36+ uv tool install poetry
37+ uv venv
38+ source .venv/bin/activate
39+ poetry install --with dev
40+
41+ - name : Run Codeflash to optimize code
42+ id : optimize_code
43+ run : |
44+ source .venv/bin/activate
45+ poetry run codeflash
Original file line number Diff line number Diff line change 1+ name : Mypy Type Checking for CLI
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+
9+ jobs :
10+ type-check-cli :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+ token : ${{ secrets.GITHUB_TOKEN }}
18+
19+ - name : Install uv
20+ uses : astral-sh/setup-uv@v5
21+ with :
22+ version : " 0.5.30"
23+
24+ - name : install poetry as a tool
25+ run : uv tool install poetry
26+
27+ - name : install dependencies
28+ run : uvx poetry install --with dev
29+
30+ - name : Run mypy on allowlist
31+ run : uvx poetry run mypy --non-interactive --config-file pyproject.toml @mypy_allowlist.txt
You can’t perform that action at this time.
0 commit comments