diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 64d66f2..cdc75a4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,15 +12,17 @@ jobs: uses: actions/checkout@v3 - uses: ./ with: - version: v2.6.0 + 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 & exit + key: ${{ secrets.DASHCAM_WORKSPACE_API }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} FORCE_COLOR: "3" 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);