Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(wokwi): Self host Wokwi CLI server #9701

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/scripts/tests_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function run_test() {
local erase_flash=$4
local sketchdir=$(dirname $sketch)
local sketchname=$(basename $sketchdir)
local result=0

if [[ -f "$sketchdir/.skip.$platform" ]] || [[ -f "$sketchdir/.skip.$target" ]] || [[ -f "$sketchdir/.skip.$platform.$target" ]]; then
echo "Skipping $sketchname test for $target, platform: $platform"
Expand Down Expand Up @@ -61,11 +62,18 @@ function run_test() {
extra_args="--embedded-services esp,arduino"
fi

result=0
echo "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
bash -c "pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args"
bash -c "set +e; pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args; exit \$?" || result=$?
result=$?
if [ $result -ne 0 ]; then
return $result
result=0
echo "Retrying test: $sketchname -- Config: $i"
bash -c "set +e; pytest tests --build-dir $build_dir -k test_$sketchname --junit-xml=$report_file $extra_args; exit \$?" || result=$?
result=$?
if [ $result -ne 0 ]; then
exit $result
fi
fi
done
}
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
echo "test_folder=${test_folder}" >> $GITHUB_OUTPUT
echo "test_type=${test_type}" >> $GITHUB_OUTPUT

- name: Upload Event file
uses: actions/upload-artifact@v4
with:
name: event_file
path: ${{github.event_path}}

build:
needs: gen_chunks
name: ${{matrix.chip}}-Build#${{matrix.chunks}}
Expand Down Expand Up @@ -267,13 +273,3 @@ jobs:
path: |
tests/**/*.xml
tests/**/result_*.json

event_file:
name: "Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: event_file
path: ${{github.event_path}}
3 changes: 3 additions & 0 deletions .github/workflows/wokwi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:
- name: Install Wokwi CLI
run: curl -L https://wokwi.com/ci/install.sh | sh

- name: Wokwi CI Server
uses: wokwi/wokwi-ci-server-action@v1

- name: Install dependencies
run: |
pip install -U pip
Expand Down