Run a serial hardware smoke test from GitHub Actions
By DataDemon · Reviewed 22 November 2026
Your board can stay plugged into the lab computer while a GitHub-hosted runner tests it. DataDemon Tunnel presents the board’s approved serial port as a local port inside the job. Your existing test can talk to the hardware without a self-hosted runner at the bench.
In three manually started GitHub Actions runs, a Raspberry Pi 1B pulsed a digital input on an Arduino Uno. The job saw the matching event over serial and confirmed the line had returned to rest. Those runs used one supervised fixture. Hardware CI walkthrough.
Start with one serial command
A useful first test asks a development board for its device ID and firmware version. Run it locally and save the expected reply. Read the ID from the board itself so that a USB-to-serial adapter plugged into the wrong board cannot produce a pass. If opening the port resets your board, allow for its startup time.
- Prepare the bench. The lab owner publishes the approved serial port. The beta workflow needs hardware CI enabled at the DataDemon edge and a verified Linux x86-64 job image, pinned by digest, containing the native CLI and your test. Supported configurations.
- Give the job access to that port. For a personal account, create its key from the primary device. For a business account, an owner or administrator creates it. Store the key as a GitHub secret and supply it only to the trusted hardware step. Whoever holds it can send any command the device accepts over serial.
- Run the check. Start the workflow manually from the trusted default branch. In command mode, your test reads the port path from
DATADEMON_SERIAL_PORT. Open it, send the query and require the expected reply within the test’s timeout. Close the port and confirm that DataDemon released the session. Hardware setup and Python example.
Read the job result
| Observation | Verdict |
|---|---|
| Device ID and version match, and the port is released | Pass. |
| Port opens but the reply is wrong or missing | The device check failed. |
| Board is offline or someone holds the port | Blocked. The device check did not run. |
| Job was interrupted or release is uncertain | Check the bench and confirm release before another run. |
Revoke the port’s key and remove the GitHub secret when the workflow is retired. Other authorised users can continue to use the published port.
When the test needs a GPIO pulse
Use a separately approved Linux GPIO bank, its own key, and a protected fixture with a known inactive state. Open serial first. If GPIO is busy, release serial. After a pulse, require both the matching device event and a confirmed return to rest. If the connection drops mid-pulse, check the fixture before another attempt.
Start with the supervised example and verify your own wiring and device protocol. For voltage or timing measurements, see the NI PXI and GPIO comparison.