ci github int tests settle (#459)

* ci: Allow more time for GitHub tests to settle

* ci: Run build-snapshot on any push, but dont dupe with PR
This commit is contained in:
James Read 2024-10-26 23:10:33 +01:00 committed by GitHub
parent 2950b59514
commit ee26fe6b50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View File

@ -4,8 +4,6 @@ name: "Build Snapshot"
on:
push:
workflow_dispatch:
pull_request:
branches: [main]
jobs:
build-snapshot:

View File

@ -36,6 +36,8 @@ class OliveTinTestRunnerStartLocalProcess extends OliveTinTestRunner {
let stdout = ""
let stderr = ""
console.log(" OliveTin starting local process...")
this.ot = spawn('./../OliveTin', ['-configdir', 'configs/' + cfg + '/'])
let logStdout = false
@ -74,6 +76,8 @@ class OliveTinTestRunnerStartLocalProcess extends OliveTinTestRunner {
if (this.ot.exitCode == null) {
this.BASE_URL = 'http://localhost:1337/'
console.log(" OliveTin waiting for local process to start...")
await waitOn({
resources: [this.BASE_URL]
})
@ -95,9 +99,14 @@ class OliveTinTestRunnerStartLocalProcess extends OliveTinTestRunner {
console.log(" OliveTin local process killed")
}
if (process.env.CI === 'true') {
// GitHub runners seem to need a bit more time to clean up
await new Promise((res) => setTimeout(res, 3000))
} else {
await new Promise((res) => setTimeout(res, 100))
}
}
}
class OliveTinTestRunnerEnv extends OliveTinTestRunner {
constructor () {