This will save us valuable computation time (and if you are a green person â also cut the CO2 emissions). I mean, if we set the PR as a draft, thereâs no need to run all the heavy tests on it, right? Maybe just build and deploy a demo would suffice for a draftâŚ
Armed with these tools, you can set the trigger to fit your need and build a full CI/CD flow (or actually, any automation). For instance, you can build iOS apps even if you do not have a Mac (by using a MacOS machine with a manual trigger).
#2: Reusable Workflows with Workflow Calls
Triggers are great, but this one gets a full title of its own.
Now letâs say youâve created a build process. You also create a test process. Now â youâd like to run the build and the tests for 3 browsers â chrome, firefox and Safari. The catch? Safari runs only on MacOS. DarnâŚ
So⌠you spin up 3 MacOS machines. You notice 2 things:
- MacOS machines are much slower and also their internet connection is much slower
- MacOS machines are much more expensive and your devops ppl (or your finance team) are sending you nice (or rather polite) emails about over-quota (real story).
In addition, you need the test coverage only from the chrome run.
I think you got the gist of it â it can be complex.
So⌠you create 3 different jobs â one for each browser. Lots of code, not nice (you donât really have to read the code â just get that it is long and not âniceâ):