From 3a7eda1ef0e16aa3091b198492e95bb10394d378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Proch=C3=A1zka?= <90197375+P-R-O-C-H-Y@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:16:43 +0200 Subject: [PATCH] ci(wokwi): Pass diagram.json file if exists to pytest (#9720) * ci(wokwi): Pass diagram.json file if exists to pytest * ci(wokwi): Rename diagrams to enable editing in Wokwi editor * ci(tests): Use newest pytest version --------- Co-authored-by: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> --- .github/scripts/tests_run.sh | 4 ++++ tests/requirements.txt | 8 ++++---- .../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 8 files changed, 8 insertions(+), 4 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 d5c6f1f35c3..74067e6d005 100755 --- a/.github/scripts/tests_run.sh +++ b/.github/scripts/tests_run.sh @@ -69,6 +69,10 @@ function run_test() { if [[ -f "$sketchdir/scenario.yaml" ]]; then extra_args+=" --wokwi-scenario $sketchdir/scenario.yaml" fi + if [[ -f "$sketchdir/diagram.$target.json" ]]; then + extra_args+=" --wokwi-diagram $sketchdir/diagram.$target.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" 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 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