Android Lint workflow using Github Actions
workflow which will run
lint code inspector on every pull request created on
main branch and when code is pushed to
.github folder and then
workflows folder inside like that
We write Github workflows in
yml file, creating an empty
android-lint.yml file inside
Then set the name of the
workflow as below.
We want to run
workflow when code is
pushed or a
pull request is created from
It defines a job named
android-lint and configures it to run on
ubuntu-latest, that means it will run on linux runner hosted by Github.
Next to create steps inside the job, first we have to checkout the code using Github action
actions/checkout@v3 as below.
Setting-up JDK version 17
Run Android Lint.
It will run Android Linter as soon as we create a pull request for
main branch or when code is pushed to
android-lint.yml file is below.
That’s it for now. I hope it was helpful.