1
1
name : Run tests
2
2
3
3
on :
4
- pull_request_target :
4
+ pull_request :
5
5
types : [opened, reopened, synchronize, labeled]
6
- branches :
7
- - master
8
6
9
7
schedule :
10
8
- cron : ' 0 2 * * *'
11
9
12
10
env :
13
11
MAX_CHUNKS : 15
14
12
WOKWI_TIMEOUT : 120000 # Milliseconds
13
+ WOKWI_CLI_TOKEN : ${{ secrets.WOKWI_CLI_TOKEN }}
15
14
16
15
concurrency :
17
16
group : hil-${{github.event.pull_request.number || github.ref}}
32
31
steps :
33
32
- name : Checkout Repository
34
33
uses : actions/checkout@v4
35
- with :
36
- ref : ${{ github.event.pull_request.head.sha }} # Check out the code of the PR
37
34
38
35
- name : Generate Chunks matrix
39
36
id : gen-chunks
@@ -87,10 +84,12 @@ jobs:
87
84
path : |
88
85
~/.build_skipped
89
86
~/.arduino/tests/**/build*.tmp/*.bin
87
+ ~/.arduino/tests/**/build*.tmp/*.elf
90
88
~/.arduino/tests/**/build*.tmp/*.json
91
89
92
90
wokwi-test :
93
91
needs : [gen_chunks, build]
92
+ if : github.event_name == 'schedule'
94
93
name : ${{matrix.chip}}-Wokwi_Test#${{matrix.chunks}}
95
94
strategy :
96
95
fail-fast : false
@@ -106,8 +105,8 @@ jobs:
106
105
uses : actions/download-artifact@v4
107
106
with :
108
107
name : ${{matrix.chip}}-${{matrix.chunks}}.artifacts
109
- path : ~/.arduino/tests/
110
-
108
+ path : ~/
109
+
111
110
- name : Install Wokwi CLI
112
111
run : curl -L https://wokwi.com/ci/install.sh | sh
113
112
@@ -123,12 +122,21 @@ jobs:
123
122
run : |
124
123
bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -w ${{env.WOKWI_TIMEOUT}}
125
124
125
+ - name : Check if tests were skipped
126
+ id : check-test-skipped
127
+ run : |
128
+ if [ -f ~/.test_skipped ]; then
129
+ echo "skipped=true" >> $GITHUB_OUTPUT
130
+ else
131
+ echo "skipped=false" >> $GITHUB_OUTPUT
132
+ fi
133
+
126
134
- name : Upload test result artifacts
127
135
uses : actions/upload-artifact@v4
128
- if : always()
136
+ if : ${{ always() && steps.check-test-skipped.outputs.skipped == 'false' }}
129
137
with :
130
138
name : wokwi_results-${{matrix.chip}}-${{matrix.chunks}}
131
- path : tests/*/*.xml
139
+ path : tests/** /*.xml
132
140
133
141
hardware-test :
134
142
needs : [gen_chunks, build]
0 commit comments