diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 28b924b..361afb6 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -5,9 +5,6 @@ on: types: - build-push pull_request: - branches: - - main - - rc workflow_dispatch: inputs: version: diff --git a/test/artifacts/config.json b/test/artifacts/config.json index 6fafe23..12bccf1 100644 --- a/test/artifacts/config.json +++ b/test/artifacts/config.json @@ -3,7 +3,7 @@ "input": ".", "output": ".", "recursive": true, - "logLevel": "debug", + "logLevel": "info", "relativePathBase": "file", "runTests": { "input": ".", @@ -17,19 +17,7 @@ "contexts": [ { "app": { "name": "chrome", "options": { "headless": true } }, - "platforms": ["mac", "linux"] - }, - { - "app": { "name": "chrome", "options": { "headless": true } }, - "platforms": ["windows"] - }, - { - "app": { "name": "firefox", "options": { "headless": true } }, - "platforms": ["mac", "linux"] - }, - { - "app": { "name": "firefox", "options": { "headless": true } }, - "platforms": ["windows"] + "platforms": ["mac", "linux", "windows"] } ] }, diff --git a/test/runTests.test.js b/test/runTests.test.js index 281623d..906ecdb 100644 --- a/test/runTests.test.js +++ b/test/runTests.test.js @@ -66,7 +66,8 @@ describe("Run tests successfully", async function () { }; const runTests = exec( - `docker run --rm -v "${artifactPath}:${internalPath}" docdetective/docdetective:${version}-${os} -c ./config.json -i . -o ./results.json` + `docker run --rm --memory=2g --cpus=2 -v "${artifactPath}:${internalPath}" docdetective/docdetective:${version}-${os} -c ./config.json -i . -o ./results.json`, + { maxBuffer: 10 * 1024 * 1024 } // 10MB buffer for output ); runTests.stdout.on("data", (data) => { @@ -82,9 +83,14 @@ describe("Run tests successfully", async function () { handleCompletion(() => reject(error)); }); - runTests.on("close", (code) => { + runTests.on("close", (code, signal) => { handleCompletion(() => { - console.log(`Child process closed with code ${code}`); + console.log(`Child process closed with code ${code} and signal ${signal}`); + + if (signal != null) { + reject(new Error(`Docker process terminated by signal ${signal}`)); + return; + } if (code !== null && code !== 0) { reject(new Error(`Docker process exited with code ${code}`));