π‘ Running HIL Tests with GitHub Actions¶

Welcome to the Hardware-in-the-Loop (HIL) CI/CD tutorial project!
This repository contains materials, documentation, source code, and examples used in a video tutorial series about running real embedded hardware tests using GitHub Actions.
π₯ Video series playlist:
https://www.youtube.com/@MyEmbeddedWay/playlists
π Repository Structure -> TBD¶
.
βββ .github/
β βββ workflows/ # GitHub Actions automation pipelines
βββ docs/ # MkDocs documentation source
βββ hw/ # Hardware configurations for example project
βββ lib/ # External librarioes used in example project
βββ src/ # Example project source code
βββ test/
β βββ _config_scripts/ # Config scripts for running all project targers
β βββ template/ # Uint tests module tempate
β βββ unity/ # Unity frameowrk
β βββ hil_tests/ # hil tests folder
β βββ peripheras_config.yaml # py-micro-hil framework cofiguration file
βββ README.md # You're here π
π What You Will Learn¶
This repository teaches you how to:
- π Set up a Raspberry Pi HIL Test Server
- π Connect Raspberry Pi to ST-Link and the target MCU
- π§ͺ Write automated HIL tests using py-micro-hil
- βοΈ Install applications from sources
- π€ Run real hardware tests inside GitHub Actions
- π¦ Publish test artifacts & logs
π Documentation¶
All documentation lives inside the docs/ directory and is published automatically to the projectβs GitHub Pages site: https://niwciu.github.io/GHA_HIL/
βΆ HIL Fundamentals¶
- What is HIL?
- Why use HIL in CI/CD?
- Hardware & software requirements
βΆ Raspberry Pi HIL Server Setup¶
- OS installation
- Installing stlink
- Installing py-micro-hil
- Lighttpd setup
- Connecting RPi to your microcontroller
βΆ Writing HIL Tests - working with test framework¶
- Python API basics
- Example test scripts
- Fixtures & test structure
- Debugging common issues
βΆ GitHub Actions Integration¶
- Workflow structure explained
- Flashing firmware automatically
- Running py-micro-hil tests remotely
- Collecting logs & artifacts
βΆ Example Project¶
- Minimal firmware
- HIL test suite
- Full CI pipeline
π§ Requirements¶
Hardware¶
- Raspberry Pi 3/4/5
- ST-Link V2/V3
- Target microcontroller (STM32 recommended)
- Cables & power supply
Software¶
- Raspberry Pi imager - https://www.raspberrypi.com/software/
- GCC / G++ / CMake / lighttpd
- stlink - https://github.com/stlink-org/stlink
- py-micro-hil - https://pypi.org/project/py-micro-hil/
- GitHub Actions runner (self-hosted)
βΆ Quick Start¶
TBD
π§ͺ Example GitHub Actions Workflow¶
TBD
ποΈ Roadmap¶
- Publish MkDocs website
- Documentation update
- Framework test and update
- Framework documentation update
- Provide YAML workflow templates
π€ Contributing¶
PRs and suggestions are welcome!
Feel free to open an issue if you want new topics covered.
π License¶
MIT or any license you choose.
π Your HIL CI/CD environment is now ready to build!