Skip to content

Commit ad8bf0f

Browse files
committed
fix: ci tests
1 parent 4d06d86 commit ad8bf0f

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ jobs:
9191
context: .
9292
push: true
9393
tags: ghcr.io/query-farm/python-airport-test-server:latest
94-
platforms: linux/amd64,linux/arm64
94+
platforms: linux/amd64
9595

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM python:slim
22

3+
EXPOSE 50003
34
WORKDIR /app
45
COPY requirements.lock ./
56
COPY pyproject.toml ./

scripts/generate-types-tests.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
import math
55

66

7-
def unescape_value(value):
7+
def unescape_value(value: str) -> str:
88
"""Unescape the value for display."""
99
if value.startswith("'") and value.endswith("'"):
1010
return value[1:-1].replace("''", "'") # Remove single quotes
1111
return value
1212

1313

14-
def parse_to_float(val):
14+
def parse_to_float(val: str) -> float:
1515
if isinstance(val, str):
1616
v = val.replace("'", "") # Remove single quotes
1717
try:
@@ -21,7 +21,7 @@ def parse_to_float(val):
2121
return val # already a float
2222

2323

24-
def sort_key(val):
24+
def sort_key(val: str) -> tuple[int] | tuple[int, float]:
2525
x = parse_to_float(val)
2626
if math.isnan(x):
2727
return (3,)
@@ -33,7 +33,7 @@ def sort_key(val):
3333
return (1, x)
3434

3535

36-
def custom_sorted(values):
36+
def custom_sorted(values: list[Any]) -> list[Any]:
3737
if "'inf'" in values or "'-inf'" in values or "'nan'" in values:
3838
# Sort using the custom key
3939
return sorted(values, key=sort_key)
@@ -181,7 +181,7 @@ def custom_sorted(values):
181181
statement ok
182182
CREATE SECRET airport_testing (
183183
type airport,
184-
auth_token 'example_token',
184+
auth_token uuid(),
185185
scope 'grpc://localhost:50003/');
186186
187187
# Reset the test server
@@ -243,3 +243,11 @@ def custom_sorted(values):
243243
print("----", file=f)
244244
print(unescape_value(value), file=f)
245245
print("", file=f)
246+
247+
print(
248+
"""# Reset the test server
249+
statement ok
250+
CALL airport_action('grpc://localhost:50003/', 'reset');
251+
""",
252+
file=f,
253+
)

0 commit comments

Comments
 (0)