Using Wokwi in GitHub Actions
You can use Wokwi CI with GitHub Actions to run your tests on every commit. You need to have a workflow that builds your project's firmware. Add the following step to your workflow:
- name: Test with Wokwi
uses: wokwi/wokwi-ci-action@v1
with:
token: ${{ secrets.WOKWI_CLI_TOKEN }}
path: / # directory with wokwi.toml, relative to repo's root
expect_text: 'Hello, world!' # optional
For a complete list of options, check out the action's README.
CLI Tokens
You also need to set up the WOKWI_CLI_TOKEN
secret in your repository settings. You can create an API token on the Wokwi CI Dashboard.
Examples
The following projects are set up to run on Wokwi CI. You can use them as a reference for your own projects. Check out the .github/workflows
directory for the complete GitHub Action configuration in each example.
- ESP32 WiFi + FreeRTOS Tasks
- STM32 Nucleo64 C031C6 with STM32 HAL
- Raspberry Pi Pico SDK - Includes an automation scenario that verifies the LED blinking pattern.
- PlatformIO Pushbutton Counter - Includes an automation scenario that pushes the button and checks the serial output.
- ESP32-C6 LP I2C (Low Power) - Includes an automation scenario that interacts with an I2C device.
- Embedded Wizard Breakout Game - Example of taking a screenshot of the simulated LCD display.
Additional resources
- Using PlatformIO CI and Wokwi in GitHub Actions - Blog post by Leonid Meleshin