1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ci: split the websockets tests into their own CI .yml file

This commit is contained in:
Delyan Angelov
2021-02-21 16:32:02 +02:00
parent cfe9f6d5d3
commit f2ce72c2bf
3 changed files with 93 additions and 55 deletions

View File

@ -1,3 +1,4 @@
import os
import x.websocket
import time
import rand
@ -8,8 +9,15 @@ pub mut:
nr_pong_received int
}
const github_job = os.getenv('GITHUB_JOB')
// tests with internal ws servers
fn test_ws() {
if github_job != '' && github_job != 'websocket_tests' {
// Do not run these tests everytime, since they are flaky.
// They have their own specialized CI runner.
return
}
port := 30000 + rand.intn(1024)
go start_server(port)
time.sleep_ms(500)