-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding unit tests #18
Comments
@SBajonczak also referenced [1] at [2]. Thanks! [1] https://docs.platformio.org/en/latest/plus/unit-testing.html |
We just discovered how @RobTillaart is testing his HX711 library on CI/GHA. He is using ArduinoCI, and it looks like it works pretty well enabling running unit tests without hardware present. Thanks, Rob! References |
Did a quick test, cloned this repo and added the Arduino unit test (quick and dirty copy / strip) to it.
It appeared that the PlatformIO workflow tries to run the code in the test folder where the unit tests reside and fails. Note that I use the Arduino-CI mainly for libraries, and I used it for an application by adding an "examples" folder, in which the applications are copied as if they were examples from a library. Configured for ESP32 platforms in .arduino-ci.yml (top folder repo) + 3 needed libraries. Added a badge for the Arduino CI in my repo (readme,md) for test. Hope this helps you to get started. |
If you want I can make a PR of my cloned repo. |
Hi Rob. I missed to respond here properly. Thank you so much for looking into this. If you could submit your improvements to the CI configuration as a PR, that would be nice indeed! With kind regards, |
Created a PR. Please enable build. |
Thanks a stack. Approved CI runs, and they succeeded on the first attempt. Excellent! |
Hi there,
I just discovered three nice projects and wanted to share them with you. They are AUnit [1], AUniter [2] and UnixHostDuino [3] and they will compile and execute unit tests for Arduino both natively on Linux or MacOS and by uploading to boards.
With kind regards,
Andreas.
[1] https://github.com/bxparks/AUnit
[2] https://github.com/bxparks/AUniter
[3] https://github.com/bxparks/UnixHostDuino
The text was updated successfully, but these errors were encountered: