Skip to content

Commit fa73d07

Browse files
authored
run tests on windows (#334)
* run tests on windows * Activate environment in Lint-and-test workflow * might not need activate-environment now * Update GitHub Actions to use newer versions * remove env passthrough * format * use sys.executable rather than hardcode uv
1 parent 544fff7 commit fa73d07

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

.github/workflows/Lint-and-test.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ jobs:
77
compare-branch: origin/main
88
python-ver: '3.13'
99
tests:
10-
runs-on: ubuntu-latest
1110
strategy:
1211
matrix:
1312
version: ['3.10','3.11', '3.12', '3.13', '3.14']
13+
os: ["ubuntu-latest", "windows-latest"]
14+
runs-on: ${{ matrix.os }}
1415
steps:
15-
- uses: actions/checkout@v4
16-
- uses: astral-sh/setup-uv@v6
16+
- uses: actions/checkout@v5
17+
- uses: astral-sh/setup-uv@v7
1718
with:
1819
python-version: ${{ matrix.version }}
1920
- name: install requirements

system_tests/lewis_tests.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import contextlib
22
import os
33
import subprocess
4+
import sys
45
import time
56
from pathlib import Path
67

@@ -18,8 +19,7 @@
1819
@contextlib.contextmanager
1920
def julabo_simulation():
2021
command = [
21-
"uv",
22-
"run",
22+
sys.executable,
2323
str(LEWIS_PATH),
2424
"julabo",
2525
"-p",
@@ -34,7 +34,9 @@ def julabo_simulation():
3434

3535

3636
def run_control_command(mode, command, value):
37-
subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), mode, command, value], env=os.environ).decode()
37+
subprocess.check_output(
38+
[sys.executable, str(LEWIS_CONTROL_PATH), mode, command, value]
39+
).decode()
3840

3941

4042
def santise_whitespace(input_str):
@@ -43,7 +45,7 @@ def santise_whitespace(input_str):
4345

4446
def query_device_status():
4547
return santise_whitespace(
46-
subprocess.check_output(["uv", "run", str(LEWIS_CONTROL_PATH), "device"], env=os.environ).decode()
48+
subprocess.check_output([sys.executable, str(LEWIS_CONTROL_PATH), "device"]).decode()
4749
)
4850

4951

@@ -57,7 +59,9 @@ def test_list_available_devices(self):
5759
When: running Lewis without parameters
5860
Then: returns a list of possible simulations
5961
"""
60-
result = santise_whitespace(subprocess.check_output(["uv", "run", str(LEWIS_PATH)]).decode())
62+
result = santise_whitespace(
63+
subprocess.check_output([sys.executable, str(LEWIS_PATH)]).decode()
64+
)
6165

6266
verify(result, self.reporter)
6367

0 commit comments

Comments
 (0)