Skip to content

Commit

Permalink
replace boolean by value
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcellino-Palerme committed Sep 27, 2024
1 parent a3d59f5 commit 57c0887
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/extractResultsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ 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
status: Fail
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
Expand Down

0 comments on commit 57c0887

Please sign in to comment.