Skip to main content

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.

tip

A valid Wokwi CLI token starts with wok_ and is exactly 44 characters long (including the wok_ prefix). If you are experiencing authorization issues, double check that your token is active, correctly formatted and doesn't contain any spaces or fancy characters.

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.

Additional resources​