From 45e61658bce67e7cd21a877dcede8e4d6d768cd2 Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 29 May 2024 16:02:26 +0200 Subject: [PATCH 1/3] ci(wokwi): Pass diagram.json file if exists to pytest --- .github/scripts/tests_run.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/tests_run.sh b/.github/scripts/tests_run.sh index 4e8ad4bb3b1..9b00bfeaebe 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -46,6 +46,10 @@ function run_test() { if [[ -f "$sketchdir/scenario.yaml" ]]; then extra_args+=" --wokwi-scenario $sketchdir/scenario.yaml" fi + if [[ -f "$sketchdir/$target.diagram.json" ]]; then + extra_args+=" --wokwi-diagram $sketchdir/$target.diagram.json" + fi + elif [ $platform == "qemu" ]; then PATH=$HOME/qemu/bin:$PATH extra_args="--embedded-services qemu --qemu-image-path $build_dir/$sketchname.ino.merged.bin" From e44e44476b31ac07e8b19efcf05ab2aca9f64b36 Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:39:40 +0200 Subject: [PATCH 2/3] ci(wokwi): Rename diagrams to enable editing in Wokwi editor --- .github/scripts/tests_run.sh | 4 ++-- .../gpio/{esp32.diagram.json => diagram.esp32.json} | 0 .../gpio/{esp32c3.diagram.json => diagram.esp32c3.json} | 0 .../gpio/{esp32c6.diagram.json => diagram.esp32c6.json} | 0 .../gpio/{esp32h2.diagram.json => diagram.esp32h2.json} | 0 .../gpio/{esp32s2.diagram.json => diagram.esp32s2.json} | 0 .../gpio/{esp32s3.diagram.json => diagram.esp32s3.json} | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename tests/validation/gpio/{esp32.diagram.json => diagram.esp32.json} (100%) rename tests/validation/gpio/{esp32c3.diagram.json => diagram.esp32c3.json} (100%) rename tests/validation/gpio/{esp32c6.diagram.json => diagram.esp32c6.json} (100%) rename tests/validation/gpio/{esp32h2.diagram.json => diagram.esp32h2.json} (100%) rename tests/validation/gpio/{esp32s2.diagram.json => diagram.esp32s2.json} (100%) rename tests/validation/gpio/{esp32s3.diagram.json => diagram.esp32s3.json} (100%) diff --git a/.github/scripts/tests_run.sh b/.github/scripts/tests_run.sh index 40aed27a2fd..74067e6d005 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -69,8 +69,8 @@ function run_test() { if [[ -f "$sketchdir/scenario.yaml" ]]; then extra_args+=" --wokwi-scenario $sketchdir/scenario.yaml" fi - if [[ -f "$sketchdir/$target.diagram.json" ]]; then - extra_args+=" --wokwi-diagram $sketchdir/$target.diagram.json" + if [[ -f "$sketchdir/diagram.$target.json" ]]; then + extra_args+=" --wokwi-diagram $sketchdir/diagram.$target.json" fi elif [ $platform == "qemu" ]; then diff --git a/tests/validation/gpio/esp32.diagram.json b/tests/validation/gpio/diagram.esp32.json similarity index 100% rename from tests/validation/gpio/esp32.diagram.json rename to tests/validation/gpio/diagram.esp32.json diff --git a/tests/validation/gpio/esp32c3.diagram.json b/tests/validation/gpio/diagram.esp32c3.json similarity index 100% rename from tests/validation/gpio/esp32c3.diagram.json rename to tests/validation/gpio/diagram.esp32c3.json diff --git a/tests/validation/gpio/esp32c6.diagram.json b/tests/validation/gpio/diagram.esp32c6.json similarity index 100% rename from tests/validation/gpio/esp32c6.diagram.json rename to tests/validation/gpio/diagram.esp32c6.json diff --git a/tests/validation/gpio/esp32h2.diagram.json b/tests/validation/gpio/diagram.esp32h2.json similarity index 100% rename from tests/validation/gpio/esp32h2.diagram.json rename to tests/validation/gpio/diagram.esp32h2.json diff --git a/tests/validation/gpio/esp32s2.diagram.json b/tests/validation/gpio/diagram.esp32s2.json similarity index 100% rename from tests/validation/gpio/esp32s2.diagram.json rename to tests/validation/gpio/diagram.esp32s2.json diff --git a/tests/validation/gpio/esp32s3.diagram.json b/tests/validation/gpio/diagram.esp32s3.json similarity index 100% rename from tests/validation/gpio/esp32s3.diagram.json rename to tests/validation/gpio/diagram.esp32s3.json From 373d2fe91916cf72a9cd75c4f3978debac348eda Mon Sep 17 00:00:00 2001 From: Jan Prochazka <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 19 Jun 2024 13:42:35 +0200 Subject: [PATCH 3/3] ci(tests): Use newest pytest version --- tests/requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index 7acb197d6ad..87bb08a67b2 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,7 +1,7 @@ cryptography==42.0.7 --only-binary cryptography pytest-cov==5.0.0 -pytest-embedded-serial-esp==1.10.2 -pytest-embedded-arduino==1.10.2 -pytest-embedded-wokwi==1.10.2 -pytest-embedded-qemu==1.10.2 +pytest-embedded-serial-esp==1.11.0 +pytest-embedded-arduino==1.11.0 +pytest-embedded-wokwi==1.11.0 +pytest-embedded-qemu==1.11.0