
TL;DR: Create an Action on GitHub so your code gets built and tested after every push, and do all this with nothing more than a "next-next-finish".
Younever used GitHub Actions and you want do do it with your Rust project; if that's the case, this might help you.
What is and Why GitHub Actions?
GitHub Actions automatize software workflow, whichper se isnot CI/CD (Continuous Integration/Continuous Delivery), but is used in this method.
So, which workflow are we going to automatize? Test and build. In other words, this:
$cargo test
$cargo build
How to do it
First, open your GitHub repository and go toActions.
The example is fromthis repository that I wrote abouthere.
This will lead you to this GitHub proposal, which will do exactly what we're set to do here, i.e., build and test:
GitHub will preview the.yml
file it will create. For this scope, you don't have to change anything (except maybe thename
from "Rust" to something else — I used "test").
Commit the change clicking on the button that will appear on the right and the file will be created:
Now, if you go toActions again, you will see GitHub creating your.yml file. For me, it took around 2 minutes.
And that's it. From now on, every time youpush
against the repository, GitHub will run the tests for you.
To see the result of the commit above, see theBuild loghere.
And that's all for today.
See ya 🙃
Cover image bySusan Q Yin
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse