From be4fcf769bf09f563b18762b8a0c98448ec0c1fb Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Wed, 19 Jun 2024 11:58:09 -0500 Subject: [PATCH 1/4] use returned exit code --- dist/index.js | 6 ++++-- src/index.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index dd70d52..762ef35 100644 --- a/dist/index.js +++ b/dist/index.js @@ -40104,7 +40104,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.green("TestDriver:"), '"Writing my report..."'.green); const { - data: { shareLink, oiResult }, + data: { shareLink, oiResult, exitcode }, } = await axios.post( `${baseUrl}/testdriver-artifacts`, { workflowId }, @@ -40116,7 +40116,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.green("TestDriver:"), '"Interpreting results..."'.green); - const isPassed = oiResult.includes("The test passed"); + console.log(exitcode) + + const isPassed = parseInt(exitcode) === 0; if (!isPassed) { core.setFailed(oiResult); diff --git a/src/index.js b/src/index.js index 11599e3..2bc6ec4 100644 --- a/src/index.js +++ b/src/index.js @@ -147,7 +147,7 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.green("TestDriver:"), '"Writing my report..."'.green); const { - data: { shareLink, oiResult }, + data: { shareLink, oiResult, exitcode }, } = await axios.post( `${baseUrl}/testdriver-artifacts`, { workflowId }, @@ -159,7 +159,9 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log(chalk.green("TestDriver:"), '"Interpreting results..."'.green); - const isPassed = oiResult.includes("The test passed"); + console.log(exitcode) + + const isPassed = parseInt(exitcode) === 0; if (!isPassed) { core.setFailed(oiResult); From 6d49aaf39d8536506ac359002d7240f7749638dc Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Wed, 19 Jun 2024 12:05:41 -0500 Subject: [PATCH 2/4] add secret --- .github/workflows/pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 64d66f2..6a24907 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -21,6 +21,7 @@ jobs: npm install dashcam-chrome --save /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --load-extension=./node_modules/dashcam-chrome/build/ 1>/dev/null 2>&1 & exit + key: ${{ secrets.DASHCAM_WORKSPACE_API }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FORCE_COLOR: "3" From d35e715043e45838f50ce5acf3432bb165009588 Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Wed, 19 Jun 2024 12:10:24 -0500 Subject: [PATCH 3/4] update for v3.3.8 --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6a24907..30cf3bf 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v3 - uses: ./ with: - version: v2.6.0 + version: v3.3.8 prompt: | 1. open youtube. 2. find a cat video From 2e612ada74025f2b073b14a895be1f42ed1b4a26 Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Wed, 19 Jun 2024 13:06:51 -0500 Subject: [PATCH 4/4] add /summarize --- .github/workflows/pr.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 30cf3bf..cdc75a4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,9 +14,10 @@ jobs: with: version: v3.3.8 prompt: | - 1. open youtube. + 1. open youtube 2. find a cat video 3. quit the browser + 4. /summarize prerun: | npm install dashcam-chrome --save /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --load-extension=./node_modules/dashcam-chrome/build/ 1>/dev/null 2>&1 &