Introduction

Run firmware tests on real microcontrollers from CI.

Build the firmware in CI, send the linked ELF to OnMCU, and run it on a real board. The device result passes or fails the CI step.

Run firmware in CI

Build the firmware

Compile the same linked ELF you would run locally. Preserve debug and defmt metadata when your logging stack needs it.

Submit it to OnMCU

The OnMCU Action installs a chosen CLI version, injects the API key from a secret, and runs the firmware on the selected board.

Stop from the MCU

A semihosting exit lets successful and failed tests end the remote job immediately. Without an exit signal, the runner must wait for the configured timeout.

Return the result

A completed job returns 0. Failed, cancelled, and timed-out runs return non-zero. You do not need to parse logs to decide whether the test passed.

Required secret

Create an API key at app.onmcu.com/settings and add it to the repository or organization secret store as ONMCU_API_KEY.

Never put the key directly in workflow YAML. Pass it with ${{ secrets.ONMCU_API_KEY }} so GitHub masks it and controls access.

On this page