From 6d5b73096b556beea8f16fd4a805091cc357f5f2 Mon Sep 17 00:00:00 2001 From: Patrick Robb Date: Wed, 16 Apr 2025 11:10:54 -0400 Subject: [PATCH 1/2] ocre-tests: make workflows run one at a time Force the tests.yml to wait on GHA build.yml to complete before triggering. Signed-off-by: Patrick Robb --- .github/workflows/tests.yml | 52 ++++++++++++++++++------------------- tests/beginTests.sh | 6 +++++ 2 files changed, 31 insertions(+), 27 deletions(-) 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/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 From 2a2fec5902491c6565bfd0fafe5f820691216b82 Mon Sep 17 00:00:00 2001 From: Patrick Robb Date: Wed, 23 Apr 2025 16:07:52 -0400 Subject: [PATCH 2/2] testing workflow trigger --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a114cfbe..54bd9572 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +TESTING WORKFLOW TRIGGER + ![Ocre logo](ocre_logo.jpg "Ocre") # Ocre [![Build](https://github.com/project-ocre/ocre-runtime/actions/workflows/build.yml/badge.svg)](https://github.com/project-ocre/ocre-runtime/actions/workflows/build.yml)