DEV Community

Cover image for Testing embedded projects: automate builds and simulate execution with Github Actions and Wokwi simulator
Kate
Kate

Posted on

Testing embedded projects: automate builds and simulate execution with Github Actions and Wokwi simulator

Testing embedded projects often turns into a slow, manual routine—compile locally, flash hardware, then hope nothing breaks. And while hardware testing will always be important, developers shouldn’t need to rely on physical boards just to verify every small change.

Introducing automation into embedded project is life-changing!

In my full article, I show a practical workflow that automatically builds and tests Arduino projects using:

  • Arduino CLI for command-line builds
  • GitHub Actions for CI/CD
  • Wokwi for fast hardware simulation and automated behavior checks

This setup means every push to GitHub gets compiled and executed in a simulator—no more broken builds going unnoticed.

👉 Full tutorial: Running wokwi simulation on CI/CD

🛠️ What the Pipeline Does

  1. Build Arduino firmware with Arduino CLI

GitHub Actions spins up a Linux runner, installs arduino-cli, grabs the board core (like arduino:avr), and compiles your sketch. If the build fails, you know immediately.

  1. Run the firmware in Wokwi

Wokwi acts as a virtual Arduino Uno/Nano/Mega.
You can assert expected serial output—for example, passing only if the simulated device prints some expected output, or otherwise —
fail on some specific output.

Every commit is checked automatically.

🧩 Why This Approach Helps

  • No need to attach physical boards for quick checks
  • Immediate detection of broken commits
  • Easy to extend with more complex simulation setups

📝 Want the full version?

The complete article includes:

✔ full workflow YAML
✔ Wokwi project setup (wokwi.toml, diagram.json)
✔ command examples
✔ local simulation setup
✔ complete build/test pipeline

👉 Read the full guide here: Running wokwi simulation on CI/CD

Top comments (0)