-
Notifications
You must be signed in to change notification settings - Fork 34
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
Creating a GitHub Action to run automated tests #200
Conversation
The GitHub Action ran on my forked repository, but it does not seems to have run on PR for Arduino CI. Are GitHub Actions turned on? I think they are on by default. |
@prestoncarman, I don't think it will run until it is part of the code being merged into. So, once this PR is accepted, then subsequent PRs will be tested. |
Ah... this must be a security issue. This allows the repository owner to review the action before allowing it to run on their repository. |
Is this intended as a guide to how a library owner might set up Arduino CI as a GitHub action in their own repo? |
See the discussion in #199. |
The PR includes documentation for a library owner who wants to use Arduino CI in a GitHub Action. Also, the Arduino CI tests in this repository are running as a GitHub Action in Ubuntu. Its nice that these tests will run in a fork without any additional set up. Both Travis CI and Appveyor CI need to be configured on a third party site. Issue #199 shares more reasoning. |
My observation (see Keypad) is that the Actions are not installed untill they have been accepted. There is a bit of a leap-of-faith, but you can go look at the Actions in the source repository and have some confidence that they will behave the same when accepted to your repository. |
After reading your comments about running in different OSes. I started looking into what GitHub Actions supports. This PR's GitHub Action now includes tests on Windows Server 2019, Ubuntu 18.04, and macOS Catalina 10.15. The version of macOS required updating the Arduino IDE to the latest version. It was nice to see that the tests pass without any other changes. |
Running on macOS 10.15 will require addressing #155. |
Also addresses #185. |
You can get macOS to pass now by explicitly downloading a more recent version of Arduino.app in your Action script. See what was added to Blink. |
I think this just needs some steps to reflect what was added in #180 |
Also, this should contain a follow-up (if it can't be done already) to add the badges to the |
Deleted a comment that was incorrect. I think this is missing a workspace-cleanup step: https://github.com/marketplace/actions/clean-workspace |
Here's the Markdown for the badge:
Each run on the GitHub hosted runners starts in a fresh environment. Each of the matrix items here: runTest:
strategy:
matrix:
os: [windows, ubuntu, macos] Is actually a separate job: So, on a GitHub Actions hosted runner, the only time you would need to clean up is if a step in a job could be negatively effected by changes to the system made by a previous step. Normally, you would just put that in a separate job, if needed, passing files from one job to the other via workflow artifacts, or data via job outputs. From the description of the |
Aah, OK. That's good to know
I definitely prefer having 3 separate badges (one per OS) surfaced in the README, even if it means 3 config files with roughly the same contents. As far as getting the actions running in the first place, I assume my settings are correct but I don't see them firing for this PR. Does that mean they need to be in the master branch before they can start working? |
Yes. If you want to see that they pass you can see that here. |
The badges created by GitHub Actions are per-workflow, not per-job, so it would require three workflow files to create three badges. I think there is probably a service to generate arbitrary badges which could be controlled by the job results in a single workflow though. However, I see that prestoncarman has split the single workflow into a |
This is my philosophy when setting up CI. The purpose of the check is to report any problems that might exist with the project, which means that a legitimate CI setup may result in a ❌ status. After that, work can be done on the project to try to get that lovely ✔️! |
Oh wow, I posted the same screenshot twice 🤦 |
A few notes about this change:
The change is ready for a final review. Side Note: It would be easy to add a workflow for macOS, but at this time I left that workflow out to allow all tests to pass. It seemed like moving to a new Arduino IDE version may be a significant change which is required for macOS (related to #185). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @prestoncarman!
I'm switching the base on this to the TDD branch to combine it with the |
Issues Fixed