diff --git a/.github/workflows/extractResultsTest.js b/.github/workflows/extractResultsTest.js index de0571b..9f505f2 100644 --- a/.github/workflows/extractResultsTest.js +++ b/.github/workflows/extractResultsTest.js @@ -25,7 +25,7 @@ fs.readFile(filePath, 'utf-8', (err, data) => { const failedTests = results.numFailedTests; const pendingTests = results.numPendingTests; const todoTests = results.numTodoTests; - const successTests = results.success; + const successTests = results.success=='true' ? 1 : 0; // Print the outputs for GitHub Actions exec(`echo "{totalTests}=${totalTests}" >> $GITHUB_OUT`); diff --git a/.github/workflows/test_unit.yml b/.github/workflows/test_unit.yml index 5dd14d7..093968e 100644 --- a/.github/workflows/test_unit.yml +++ b/.github/workflows/test_unit.yml @@ -86,7 +86,7 @@ jobs: run: | node .github/workflows/extractResultsTest.js - name: Generate Badges fail result global tests - if: steps.extract_results.outputs.successTests == 'false' + if: steps.extract_results.outputs.successTests == 0 uses: jaywcjlove/generated-badges@main with: label: Tests @@ -94,7 +94,7 @@ jobs: color: 'red' output: badges/tests-result.svg - name: Generate Badges pass result global tests - if: steps.extract_results.outputs.successTests == 'true' + if: steps.extract_results.outputs.successTests == 1 uses: jaywcjlove/generated-badges@main with: label: Tests