diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d7edfac6..e2a4fec3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,33 +1,31 @@ name: Tests on: - push: - branches: - - main - pull_request: - branches: - - main + workflow_run: + workflows: ["Build"] + types: + - completed jobs: - tests: - runs-on: zephyr-xlarge-runner + tests: + runs-on: zephyr-xlarge-runner - steps: - - name: Make the github actions runner recursively take ownership of the github workspace - run: sudo chown -R $(whoami) ${{ github.workspace }} + steps: + - name: Make the github actions runner recursively take ownership of the github workspace + run: sudo chown -R $(whoami) ${{ github.workspace }} - - name: Checkout - uses: actions/checkout@v4 - - - name: Flash Validation Tests - run: | - cd tests && bash beginTests.sh "flashValidation" + - name: Checkout + uses: actions/checkout@v4 + + - name: Flash Validation Tests + run: | + cd tests && bash beginTests.sh "flashValidation" - - name: Print Flash Validation Logs - if: always() - run: cat /tmp/flashValidation.log - - - name: Upload log file as artifact - if: always() - uses: actions/upload-artifact@v4 - with: - name: "FlashValidation.log" - path: /tmp/flashValidation.log + - name: Print Flash Validation Logs + if: always() + run: cat /tmp/flashValidation.log + + - name: Upload log file as artifact + if: always() + uses: actions/upload-artifact@v4 + with: + name: "FlashValidation.log" + path: /tmp/flashValidation.log diff --git a/tests/README.md b/tests/README.md index 9c9f6da8..28a42dc9 100644 --- a/tests/README.md +++ b/tests/README.md @@ -58,3 +58,5 @@ that it exits with 0 on success and 1 on failure. ``` Execution commands are run with `bash -c "execution command"`. + +placeholder \ No newline at end of file diff --git a/tests/beginTests.sh b/tests/beginTests.sh index 945c9bc6..5f9cf1dc 100755 --- a/tests/beginTests.sh +++ b/tests/beginTests.sh @@ -110,4 +110,10 @@ done echo "Test suite is complete" >> $LOGFILE +if [ $TEST_GROUP_RESULT -eq 0 ]; then + echo "$NAME test group passed" +else + echo "$NAME test group failed" +fi + exit $TEST_GROUP_RESULT \ No newline at end of file