GitHub Actions for Android part 2

Tutorial to Build and run Unit tests using GitHub Actions as CI. To learn more about GitHub Actions, read the Github documentation.

  1. Build app APK.
  2. Run unit tests.

The CI process is going to be managed by a yaml file. Step one create a new yaml file in your project root and push to GitHub, for file location example .github/workflows/android-master.yml.

When you open a new PR GitHub triggers the Actions you configure on your yaml file.

  1. Open a Github PR.

2. Check the GitHub Actions are triggered, at the end of the run, you get a pass or fail, the error blocks the PR from merging (image below).

Go to your project repo and click on Actions, there you can see the output app APK that was generated from the GitHub build action.

Also, you can create a new yaml file from your GitHub’s repo.

IMHO: GitHub Actions it’s a great feature! Thanks Github! I’m a CI/CD fan, and I think GitHub Actions is a great solution. Now developers can create code and see there CI in one place (GitHub repo dashboard), no need to manage another CI tool dashboard, everything in one place.

Thanks for spending your time reading it and let me know if I’m wrong somewhere or if there’s something that could do differently or better. I’m open to your feedback 🙌🏻


software engineer, read, swim, travel. apps:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store