Skip to content

Commit 2041f87

Browse files
committed
fix E2E workflow
1 parent 98ab53c commit 2041f87

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/e2e-futurehouse-structure.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Set up Python 3.11 for CLI
6262
uses: astral-sh/setup-uv@v5
6363
with:
64-
python-version: 3.11.6
64+
python-version: 3.11
6565

6666
- name: Install dependencies (CLI)
6767
run: |
@@ -70,5 +70,7 @@ jobs:
7070
7171
- name: Run Codeflash to optimize code
7272
id: optimize_code
73+
env:
74+
PYTHONUTF8: 1
7375
run: |
7476
uv run tests/scripts/end_to_end_test_futurehouse.py

tests/scripts/end_to_end_test_utilities.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def run_codeflash_command(
9494

9595
output = []
9696
for line in process.stdout:
97+
line = line.strip().encode("utf-8").decode("utf-8")
9798
logging.info(line.strip())
9899
output.append(line)
99100

@@ -122,7 +123,7 @@ def build_command(
122123
) -> list[str]:
123124
python_path = "../../../codeflash/main.py" if "code_directories" in str(cwd) else "../codeflash/main.py"
124125

125-
base_command = ["python", python_path, "--file", config.file_path, "--no-pr"]
126+
base_command = ["uv", "run", "--no-project", python_path, "--file", config.file_path, "--no-pr"]
126127

127128
if config.function_name:
128129
base_command.extend(["--function", config.function_name])
@@ -187,13 +188,14 @@ def validate_stdout_in_candidate(stdout: str, expected_in_stdout: list[str]) ->
187188
def run_trace_test(cwd: pathlib.Path, config: TestConfig, expected_improvement_pct: int) -> bool:
188189
test_root = cwd / "tests" / (config.test_framework or "")
189190
clear_directory(test_root)
190-
command = ["python", "-m", "codeflash.main", "optimize", "workload.py"]
191+
command = ["uv", "run", "--no-project", "-m", "codeflash.main", "optimize", "workload.py"]
191192
process = subprocess.Popen(
192193
command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, cwd=str(cwd), env=os.environ.copy()
193194
)
194195

195196
output = []
196197
for line in process.stdout:
198+
line = line.strip().encode("utf-8").decode("utf-8")
197199
logging.info(line.strip())
198200
output.append(line)
199201

0 commit comments

Comments
 (0)