File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed
examples/server/tests/features/steps Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,14 @@ jobs:
25
25
strategy :
26
26
matrix :
27
27
sanitizer : [ADDRESS, THREAD, UNDEFINED]
28
- build_type : [Debug, Release ]
28
+ build_type : [Debug]
29
29
include :
30
30
- build_type : Release
31
31
sanitizer : " "
32
- exclude :
33
- - build_type : Release
34
- sanitizer : ADDRESS
35
- - build_type : Release
32
+ - build_type : Debug
36
33
sanitizer : THREAD
37
- - build_type : Release
38
- sanitizer : UNDEFINED
34
+ disabled_on_pr : true
35
+ fail-fast : false # While -DLLAMA_SANITIZE_THREAD=ON is broken
39
36
40
37
container :
41
38
image : ubuntu:latest
@@ -81,13 +78,14 @@ jobs:
81
78
82
79
- name : Tests
83
80
id : server_integration_tests
81
+ if : ${{ !matrix.disabled_on_pr || !github.event.pull_request }}
84
82
run : |
85
83
cd examples/server/tests
86
84
PORT=8888 ./tests.sh
87
85
88
86
- name : Slow tests
89
87
id : server_integration_tests_slow
90
- if : ${{ github.event.schedule != '' && matrix.build_type == 'Release' || github.event.inputs.slow_tests == 'true ' }}
88
+ if : ${{ ( github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
91
89
run : |
92
90
cd examples/server/tests
93
91
PORT=8888 ./tests.sh --stop --no-skipped --no-capture --tags slow
@@ -124,13 +122,14 @@ jobs:
124
122
125
123
- name : Tests
126
124
id : server_integration_tests
125
+ if : ${{ !matrix.disabled_on_pr || !github.event.pull_request }}
127
126
run : |
128
127
cd examples/server/tests
129
128
behave.exe --summary --stop --no-capture --exclude 'issues|wrong_usages|passkey' --tags llama.cpp
130
129
131
130
- name : Slow tests
132
131
id : server_integration_tests_slow
133
- if : ${{ github.event.schedule != '' || github.event.inputs.slow_tests == 'true' }}
132
+ if : ${{ ( github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release ' }}
134
133
run : |
135
134
cd examples/server/tests
136
135
behave.exe --stop --no-skipped --no-capture --tags slow
Original file line number Diff line number Diff line change @@ -119,14 +119,18 @@ def step_server_metrics(context):
119
119
def step_start_server (context ):
120
120
start_server_background (context )
121
121
attempts = 0
122
+ max_attempts = 20
123
+ if 'GITHUB_ACTIONS' in os .environ :
124
+ max_attempts *= 2
125
+
122
126
while True :
123
127
with closing (socket .socket (socket .AF_INET , socket .SOCK_STREAM )) as sock :
124
128
result = sock .connect_ex ((context .server_fqdn , context .server_port ))
125
129
if result == 0 :
126
130
print ("\x1b [33;46mserver started!\x1b [0m" )
127
131
return
128
132
attempts += 1
129
- if attempts > 20 :
133
+ if attempts > max_attempts :
130
134
assert False , "server not started"
131
135
print (f"waiting for server to start, connect error code = { result } ..." )
132
136
time .sleep (0.1 )
@@ -943,6 +947,9 @@ async def wait_for_health_status(context,
943
947
print (f"Starting checking for health for expected_health_status={ expected_health_status } \n " )
944
948
interval = 0.5
945
949
counter = 0
950
+ if 'GITHUB_ACTIONS' in os .environ :
951
+ timeout *= 2
952
+
946
953
async with aiohttp .ClientSession () as session :
947
954
while True :
948
955
async with await session .get (f'{ base_url } /health' , params = params ) as health_response :
You can’t perform that action at this time.
0 commit comments