diff options
author | Christian Breunig <christian@breunig.cc> | 2024-07-05 20:23:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 20:23:29 +0200 |
commit | 95072971ac08ffe59bc44237494776cc1c495609 (patch) | |
tree | 1864d2ead4721d79db5bf0500a5559def3296b25 /.github | |
parent | 24f7003f58a21f653adaf7daba1779d37069adbc (diff) | |
parent | b5ac16190ac8fa853808b0c2e16ec9899414458b (diff) | |
download | vyos-1x-95072971ac08ffe59bc44237494776cc1c495609.tar.gz vyos-1x-95072971ac08ffe59bc44237494776cc1c495609.zip |
Merge pull request #3789 from c-po/github-action-build
GitHub: T6494: do not use 0/null value to mark build succeed
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/package-smoketest.yml | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/.github/workflows/package-smoketest.yml b/.github/workflows/package-smoketest.yml index 36558f4ce..68f914108 100644 --- a/.github/workflows/package-smoketest.yml +++ b/.github/workflows/package-smoketest.yml @@ -78,12 +78,13 @@ jobs: id: test shell: bash run: | - # always fail first - echo "exit_code=1" >> $GITHUB_OUTPUT + set -e sudo make test - exit_code=$? - echo "exit_code=$exit_code" >> $GITHUB_OUTPUT - exit $exit_code + if [[ $? == 0 ]]; then + echo "exit_code=success" >> $GITHUB_OUTPUT + else + echo "exit_code=fail" >> $GITHUB_OUTPUT + fi test_config_load: needs: build_iso @@ -108,12 +109,13 @@ jobs: id: test shell: bash run: | - # always fail first - echo "exit_code=1" >> $GITHUB_OUTPUT + set -e sudo make testc - exit_code=$? - echo "exit_code=$exit_code" >> $GITHUB_OUTPUT - exit $exit_code + if [[ $? == 0 ]]; then + echo "exit_code=success" >> $GITHUB_OUTPUT + else + echo "exit_code=fail" >> $GITHUB_OUTPUT + fi test_raid1_install: needs: build_iso @@ -138,12 +140,13 @@ jobs: id: test shell: bash run: | - # always fail first - echo "exit_code=1" >> $GITHUB_OUTPUT + set -e sudo make testraid - exit_code=$? - echo "exit_code=$exit_code" >> $GITHUB_OUTPUT - exit $exit_code + if [[ $? == 0 ]]; then + echo "exit_code=success" >> $GITHUB_OUTPUT + else + echo "exit_code=fail" >> $GITHUB_OUTPUT + fi result: needs: @@ -159,15 +162,15 @@ jobs: uses: mshick/add-pr-comment@v2 with: message: | - CI integration ${{ needs.test_smoketest_cli.outputs.exit_code == 0 && needs.test_config_load.outputs.exit_code == 0 && needs.test_raid1_install.outputs.exit_code == 0 && '👍 passed!' || '❌ failed!' }} + CI integration ${{ needs.test_smoketest_cli.outputs.exit_code == 'success' && needs.test_config_load.outputs.exit_code == 'success' && needs.test_raid1_install.outputs.exit_code == 'success' && '👍 passed!' || '❌ failed!' }} ### Details [CI logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - * ${{ needs.test_smoketest_cli.outputs.exit_code == '0' && '👍 passed' || '❌ failed' }} CLI Smoketests returned: ${{ needs.test_smoketest_cli.outputs.exit_code }} - * ${{ needs.test_config_load.outputs.exit_code == '0' && '👍 passed' || '❌ failed' }} Config tests returned: ${{ needs.test_config_load.outputs.exit_code }} - * ${{ needs.test_raid1_install.outputs.exit_code == '0' && '👍 passed' || '❌ failed' }} RAID1 tests returned: ${{ needs.test_raid1_install.outputs.exit_code }} + * CLI Smoketests ${{ needs.test_smoketest_cli.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }} + * Config tests ${{ needs.test_config_load.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }} + * RAID1 tests ${{ needs.test_raid1_install.outputs.exit_code == 'success' && '👍 passed' || '❌ failed' }} message-id: "SMOKETEST_RESULTS" allow-repeats: false |