Skip to content

Commit da41a51

Browse files
committed
fixed all end to end tests
1 parent 055ff2e commit da41a51

6 files changed

+245
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
bubble-sort-optimization-unittest:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
COLUMNS: 110
15+
MAX_RETRIES: 3
16+
RETRY_DELAY: 5
17+
EXPECTED_IMPROVEMENT_PCT: 300
18+
CODEFLASH_END_TO_END: 1
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up Python 3.11 for CLI
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
python-version: 3.11.6
29+
30+
- name: Install dependencies (CLI)
31+
run: |
32+
uv tool install poetry
33+
uv venv
34+
source .venv/bin/activate
35+
poetry install --with dev
36+
37+
- name: Run Codeflash to optimize code
38+
id: optimize_code
39+
run: |
40+
source .venv/bin/activate
41+
poetry run python tests/scripts/end_to_end_test_bubblesort_unittest.py
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Coverage E2E
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
end-to-end-test-coverage:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
MAX_RETRIES: 3
15+
RETRY_DELAY: 5
16+
CODEFLASH_END_TO_END: 1
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Set up Python 3.11 for CLI
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
python-version: 3.11.6
27+
28+
- name: Install dependencies (CLI)
29+
run: |
30+
uv tool install poetry
31+
uv venv
32+
source .venv/bin/activate
33+
poetry install --with dev
34+
poetry add black # my-best-repo in end_to_end_test_coverage.py is configured to use black
35+
36+
- name: Run Codeflash to optimize code
37+
id: optimize_code
38+
run: |
39+
source .venv/bin/activate
40+
poetry run python tests/scripts/end_to_end_test_coverage.py
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
futurehouse-structure:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
COLUMNS: 110
15+
MAX_RETRIES: 3
16+
RETRY_DELAY: 5
17+
EXPECTED_IMPROVEMENT_PCT: 10
18+
CODEFLASH_END_TO_END: 1
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up Python 3.11 for CLI
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
python-version: 3.11.6
29+
30+
- name: Install dependencies (CLI)
31+
run: |
32+
uv tool install poetry
33+
uv venv
34+
source .venv/bin/activate
35+
poetry install --with dev
36+
37+
- name: Run Codeflash to optimize code
38+
id: optimize_code
39+
run: |
40+
source .venv/bin/activate
41+
poetry run python tests/scripts/end_to_end_test_futurehouse.py
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
init-optimization:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
COLUMNS: 110
15+
MAX_RETRIES: 3
16+
RETRY_DELAY: 5
17+
EXPECTED_IMPROVEMENT_PCT: 300
18+
CODEFLASH_END_TO_END: 1
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up Python 3.11 for CLI
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
python-version: 3.11.6
29+
30+
- name: Install dependencies (CLI)
31+
run: |
32+
uv tool install poetry
33+
uv venv
34+
source .venv/bin/activate
35+
poetry install --with dev
36+
37+
- name: Run Codeflash to optimize code
38+
id: optimize_code
39+
run: |
40+
source .venv/bin/activate
41+
poetry run python tests/scripts/end_to_end_test_init_optimization.py
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
tracer-replay:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
COLUMNS: 110
15+
MAX_RETRIES: 3
16+
RETRY_DELAY: 5
17+
EXPECTED_IMPROVEMENT_PCT: 10
18+
CODEFLASH_END_TO_END: 1
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up Python 3.11 for CLI
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
python-version: 3.11.6
29+
30+
- name: Install dependencies (CLI)
31+
run: |
32+
uv tool install poetry
33+
uv venv
34+
source .venv/bin/activate
35+
poetry install --with dev
36+
37+
- name: Run Codeflash to optimize code
38+
id: optimize_code
39+
run: |
40+
source .venv/bin/activate
41+
poetry run python tests/scripts/end_to_end_test_tracer_replay.py
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
topological-sort-optimization:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
13+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
14+
COLUMNS: 110
15+
MAX_RETRIES: 3
16+
RETRY_DELAY: 5
17+
EXPECTED_IMPROVEMENT_PCT: 5
18+
CODEFLASH_END_TO_END: 1
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Set up Python 3.11 for CLI
26+
uses: astral-sh/setup-uv@v5
27+
with:
28+
python-version: 3.11.6
29+
30+
- name: Install dependencies (CLI)
31+
run: |
32+
uv tool install poetry
33+
uv venv
34+
source .venv/bin/activate
35+
poetry install --with dev
36+
37+
- name: Run Codeflash to optimize code
38+
id: optimize_code
39+
run: |
40+
source .venv/bin/activate
41+
poetry run python tests/scripts/end_to_end_test_topological_sort.py

0 commit comments

Comments
 (0)