Skip to content

Commit ba66590

Browse files
committed
ci(wokwi): Support wokwi
1 parent 140cb2f commit ba66590

20 files changed

+152
-148
lines changed

.github/workflows/hil.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
name: Run tests
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types: [opened, reopened, synchronize, labeled]
6-
branches:
7-
- master
86

97
schedule:
108
- cron: '0 2 * * *'
119

1210
env:
1311
MAX_CHUNKS: 15
1412
WOKWI_TIMEOUT: 120000 # Milliseconds
13+
WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }}
1514

1615
concurrency:
1716
group: hil-${{github.event.pull_request.number || github.ref}}
@@ -87,10 +86,12 @@ jobs:
8786
path: |
8887
~/.build_skipped
8988
~/.arduino/tests/**/build*.tmp/*.bin
89+
~/.arduino/tests/**/build*.tmp/*.elf
9090
~/.arduino/tests/**/build*.tmp/*.json
9191
9292
wokwi-test:
9393
needs: [gen_chunks, build]
94+
if: github.event_name == 'schedule'
9495
name: ${{matrix.chip}}-Wokwi_Test#${{matrix.chunks}}
9596
strategy:
9697
fail-fast: false
@@ -106,8 +107,8 @@ jobs:
106107
uses: actions/download-artifact@v4
107108
with:
108109
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
109-
path: ~/.arduino/tests/
110-
110+
path: ~/
111+
111112
- name: Install Wokwi CLI
112113
run: curl -L https://wokwi.com/ci/install.sh | sh
113114

@@ -123,12 +124,21 @@ jobs:
123124
run: |
124125
bash .github/scripts/tests_run.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}} -w ${{env.WOKWI_TIMEOUT}}
125126
127+
- name: Check if tests were skipped
128+
id: check-test-skipped
129+
run: |
130+
if [ -f ~/.test_skipped ]; then
131+
echo "skipped=true" >> $GITHUB_OUTPUT
132+
else
133+
echo "skipped=false" >> $GITHUB_OUTPUT
134+
fi
135+
126136
- name: Upload test result artifacts
127137
uses: actions/upload-artifact@v4
128-
if: always()
138+
if: ${{ always() && steps.check-test-skipped.outputs.skipped == 'false' }}
129139
with:
130140
name: wokwi_results-${{matrix.chip}}-${{matrix.chunks}}
131-
path: tests/*/*.xml
141+
path: tests/**/*.xml
132142

133143
hardware-test:
134144
needs: [gen_chunks, build]

tests/gpio/test_gpio.py

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)