Skip to content

Commit 1b7054e

Browse files
committed
end to end test with prod aiserver
1 parent cada1c9 commit 1b7054e

File tree

2 files changed

+314
-0
lines changed

2 files changed

+314
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: end-to-end-test
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
jobs:
8+
bubble-sort-optimization-pytest-no-git:
9+
runs-on: ubuntu-latest
10+
env:
11+
CODEFLASH_AIS_SERVER: prod
12+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY_AISERVER }}
13+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
14+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
15+
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
16+
COLUMNS: 110
17+
MAX_RETRIES: 3
18+
RETRY_DELAY: 5
19+
EXPECTED_IMPROVEMENT_PCT: 300
20+
CODEFLASH_END_TO_END: 1
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Set up Python 3.11 for CLI
28+
uses: astral-sh/setup-uv@v5
29+
with:
30+
python-version: 3.11.6
31+
32+
- name: Install dependencies (CLI)
33+
run: |
34+
cd ./codeflash
35+
uv tool install poetry
36+
uv venv
37+
source .venv/bin/activate
38+
poetry install --with dev
39+
40+
- name: Remove .git
41+
run: |
42+
if [ -d ".git" ]; then
43+
echo ".git directory exists!"
44+
sudo rm -rf .git
45+
if [ -d ".git" ]; then
46+
echo ".git directory still exists after removal attempt!"
47+
exit 1
48+
else
49+
echo ".git directory successfully removed."
50+
fi
51+
else
52+
echo ".git directory does not exist. Nothing to remove."
53+
exit 1
54+
fi
55+
56+
- name: Run Codeflash to optimize code
57+
id: optimize_code
58+
run: |
59+
cd ./codeflash
60+
source .venv/bin/activate
61+
poetry run python tests/scripts/end_to_end_test_bubblesort_pytest.py

.gitignore

Lines changed: 253 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,253 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
**/__pycache__/
4+
*.py[cod]
5+
*$py.class
6+
7+
# C extensions
8+
*.so
9+
10+
# Distribution / packaging
11+
.Python
12+
build/
13+
develop-eggs/
14+
cli/dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
*.pyc
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.nox/
45+
.coverage
46+
.coverage.*
47+
.cache
48+
nosetests.xml
49+
coverage.xml
50+
*.cover
51+
*.py,cover
52+
.hypothesis/
53+
.pytest_cache/
54+
cover/
55+
56+
# Translations
57+
*.mo
58+
*.pot
59+
60+
# Django stuff:
61+
*.log
62+
local_settings.py
63+
db.sqlite3
64+
db.sqlite3-journal
65+
66+
# Flask stuff:
67+
instance/
68+
.webassets-cache
69+
70+
# Scrapy stuff:
71+
.scrapy
72+
73+
# Sphinx documentation
74+
docs/_build/
75+
76+
# PyBuilder
77+
.pybuilder/
78+
target/
79+
80+
# Jupyter Notebook
81+
.ipynb_checkpoints
82+
83+
# IPython
84+
profile_default/
85+
ipython_config.py
86+
87+
# pyenv
88+
# For a library or package, you might want to ignore these files since the code is
89+
# intended to run in multiple environments; otherwise, check them in:
90+
# .python-version
91+
92+
# pipenv
93+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
95+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
96+
# install all needed dependencies.
97+
#Pipfile.lock
98+
99+
# poetry
100+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
101+
# This is especially recommended for binary packages to ensure reproducibility, and is more
102+
# commonly ignored for libraries.
103+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
104+
#poetry.lock
105+
106+
# pdm
107+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
108+
#pdm.lock
109+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
110+
# in version control.
111+
# https://pdm.fming.dev/#use-with-ide
112+
.pdm.toml
113+
114+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
115+
__pypackages__/
116+
117+
# Celery stuff
118+
celerybeat-schedule
119+
celerybeat.pid
120+
121+
# SageMath parsed files
122+
*.sage.py
123+
124+
# Environments
125+
.env
126+
**/.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161+
# and can be added to the global gitignore or merged into this file. For a more nuclear
162+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163+
#.idea/
164+
.aider*
165+
/js/common/node_modules/
166+
/node_modules/
167+
*.xml
168+
*.pem
169+
170+
# Ruff cache
171+
.ruff_cache/
172+
173+
# IDE settings
174+
.idea/
175+
.vscode/
176+
177+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
178+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
179+
180+
# User-specific stuff
181+
.idea/**/workspace.xml
182+
.idea/**/tasks.xml
183+
.idea/**/usage.statistics.xml
184+
.idea/**/dictionaries
185+
.idea/**/shelf
186+
187+
# AWS User-specific
188+
.idea/**/aws.xml
189+
190+
# Generated files
191+
.idea/**/contentModel.xml
192+
193+
# Sensitive or high-churn files
194+
.idea/**/dataSources/
195+
.idea/**/dataSources.ids
196+
.idea/**/dataSources.local.xml
197+
.idea/**/sqlDataSources.xml
198+
.idea/**/dynamic.xml
199+
.idea/**/uiDesigner.xml
200+
.idea/**/dbnavigator.xml
201+
202+
# Gradle
203+
.idea/**/gradle.xml
204+
.idea/**/libraries
205+
206+
# Gradle and Maven with auto-import
207+
# When using Gradle or Maven with auto-import, you should exclude module files,
208+
# since they will be recreated, and may cause churn. Uncomment if using
209+
# auto-import.
210+
# .idea/artifacts
211+
# .idea/compiler.xml
212+
# .idea/jarRepositories.xml
213+
# .idea/modules.xml
214+
# .idea/*.iml
215+
# .idea/modules
216+
# *.iml
217+
# *.ipr
218+
219+
# CMake
220+
cmake-build-*/
221+
222+
# Mongo Explorer plugin
223+
.idea/**/mongoSettings.xml
224+
225+
# File-based project format
226+
*.iws
227+
228+
# IntelliJ
229+
out/
230+
231+
# mpeltonen/sbt-idea plugin
232+
.idea_modules/
233+
234+
# JIRA plugin
235+
atlassian-ide-plugin.xml
236+
237+
# Cursive Clojure plugin
238+
.idea/replstate.xml
239+
240+
# SonarLint plugin
241+
.idea/sonarlint/
242+
243+
# Crashlytics plugin (for Android Studio and IntelliJ)
244+
com_crashlytics_export_strings.xml
245+
crashlytics.properties
246+
crashlytics-build.properties
247+
fabric.properties
248+
249+
# Editor-based Rest Client
250+
.idea/httpRequests
251+
252+
# Android studio 3.1+ serialized cache file
253+
.idea/caches/build_file_checksums.ser

0 commit comments

Comments
 (0)