From f6fa2447ed9133a413adb3e2c97abb574c332ae9 Mon Sep 17 00:00:00 2001 From: Tomas Sebestik Date: Fri, 19 Jul 2024 08:59:45 +0200 Subject: [PATCH] feat(tests): Add WOKWI test action --- .github/workflows/wokwi-test.yml | 24 ++++++++++++++++++++++++ diagram.json | 7 +++++++ wokwi.toml | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 .github/workflows/wokwi-test.yml create mode 100644 diagram.json create mode 100644 wokwi.toml diff --git a/.github/workflows/wokwi-test.yml b/.github/workflows/wokwi-test.yml new file mode 100644 index 0000000..2582f31 --- /dev/null +++ b/.github/workflows/wokwi-test.yml @@ -0,0 +1,24 @@ +name: Build and test WOKWI + +on: + workflow_dispatch: + pull_request: + +jobs: + build-and-test-wokwi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build Test Application with ESP-IDF + uses: espressif/esp-idf-ci-action@v1 + with: + esp_idf_version: "latest" # latest is the default version + target: esp32 + path: 'test_app' + + - name: Test with Wokwi + uses: wokwi/wokwi-ci-action@v1 + with: + token: ${{ secrets.WOKWI_CLI_TOKEN }} + expect_text: 'Mean' diff --git a/diagram.json b/diagram.json new file mode 100644 index 0000000..670de64 --- /dev/null +++ b/diagram.json @@ -0,0 +1,7 @@ +{ + "version": 1, + "author": "Espressif", + "editor": "wokwi", + "parts": [], + "connections": [] +} diff --git a/wokwi.toml b/wokwi.toml new file mode 100644 index 0000000..92715db --- /dev/null +++ b/wokwi.toml @@ -0,0 +1,4 @@ +[wokwi] +version = 1 +firmware = 'test_app/build/flasher_args.json' +elf = 'test_app/build/example_test_app.elf'