-
Notifications
You must be signed in to change notification settings - Fork 42
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
GitHub Action workflow to build and run Unit Tests #160
GitHub Action workflow to build and run Unit Tests #160
Conversation
Would you mind updating the readme about how to run the tests locally. Also if possible it would be nice if all the temporary files could be put one dir that could be ignored from git. |
Also do you know if it's possible to advance the result of the millis() in tests so that the timeout tests would run faster? |
Sure, I'm working on it, I'll do some PRs soon.
Yes, it is possible to modify millis(), in fact I recently implemented it for a library that required it for testing: Arduino Uptime But in this case I don't think it is advisable, since the "timeout" test is only slow due to its own operation, and it should be so to be able to check its real operation. For quick testing, the best option would be to exclude it from execution:
|
My initial idea would have been to make the call to millis() run faster. That is what I did before but they are fast enough with this change: |
Hi,
I have added a Github Actions workflow to compile and run the unit tests on the native system (Linux or MacOS).
It is based on Arduino Unit Tests library from Arduino-CI, and EpoxyDuino for native build.
You can see how it works in my repo:
Unit Test workflow
I hope it can be useful.
Best regards.