From 1f106a0caf442bf147f457039dc7f39ee1d6793d Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 12 May 2022 15:36:50 +0300 Subject: [PATCH] Test ESP-IDF with PIO Unit Testing --- .github/workflows/examples.yml | 3 ++- .../test/test_dummy/test_dummy.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 examples/espidf-hello-world/test/test_dummy/test_dummy.c diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 06f82af..f063fc8 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -45,4 +45,5 @@ jobs: pio pkg install --global --platform symlink://. - name: Build examples run: | - platformio run -d ${{ matrix.example }} + pio run -d ${{ matrix.example }} + pio test -d "examples/espidf-hello-world" -e esp32dev --without-uploading --without-testing diff --git a/examples/espidf-hello-world/test/test_dummy/test_dummy.c b/examples/espidf-hello-world/test/test_dummy/test_dummy.c new file mode 100644 index 0000000..b0c7025 --- /dev/null +++ b/examples/espidf-hello-world/test/test_dummy/test_dummy.c @@ -0,0 +1,15 @@ +#include + +void test_dummy(void) +{ + TEST_ASSERT_EQUAL(1, 1); +} + +void app_main() +{ + UNITY_BEGIN(); + + RUN_TEST(test_dummy); + + UNITY_END(); +} \ No newline at end of file