Skip to content

Commit c13216f

Browse files
ocre-tests: make workflows run one at a time (#62)
Force the tests.yml to wait on GHA build.yml to complete before triggering. Signed-off-by: Patrick Robb <probb@iol.unh.edu>
1 parent bdd2151 commit c13216f

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

.github/workflows/tests.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
11
name: Tests
22
on:
3-
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
3+
workflow_run:
4+
workflows: ["Build"]
5+
types:
6+
- completed
97
jobs:
10-
tests:
11-
runs-on: zephyr-xlarge-runner
8+
tests:
9+
runs-on: zephyr-xlarge-runner
1210

13-
steps:
14-
- name: Make the github actions runner recursively take ownership of the github workspace
15-
run: sudo chown -R $(whoami) ${{ github.workspace }}
11+
steps:
12+
- name: Make the github actions runner recursively take ownership of the github workspace
13+
run: sudo chown -R $(whoami) ${{ github.workspace }}
1614

17-
- name: Checkout
18-
uses: actions/checkout@v4
19-
20-
- name: Flash Validation Tests
21-
run: |
22-
cd tests && bash beginTests.sh "flashValidation"
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Flash Validation Tests
19+
run: |
20+
cd tests && bash beginTests.sh "flashValidation"
2321
24-
- name: Print Flash Validation Logs
25-
if: always()
26-
run: cat /tmp/flashValidation.log
27-
28-
- name: Upload log file as artifact
29-
if: always()
30-
uses: actions/upload-artifact@v4
31-
with:
32-
name: "FlashValidation.log"
33-
path: /tmp/flashValidation.log
22+
- name: Print Flash Validation Logs
23+
if: always()
24+
run: cat /tmp/flashValidation.log
25+
26+
- name: Upload log file as artifact
27+
if: always()
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: "FlashValidation.log"
31+
path: /tmp/flashValidation.log

tests/beginTests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,10 @@ done
110110

111111
echo "Test suite is complete" >> $LOGFILE
112112

113+
if [ $TEST_GROUP_RESULT -eq 0 ]; then
114+
echo "$NAME test group passed"
115+
else
116+
echo "$NAME test group failed"
117+
fi
118+
113119
exit $TEST_GROUP_RESULT

0 commit comments

Comments
 (0)