Running lint checks and tests on GitHub Actions
In Chapter 11, we learned how to run lint checks on our project using shell commands on the terminal. We have also learned how to write tests for our code base. In this section, we are going to run the format, lint checks, and tests on our newly created actions and we will do all of this step by step:
- First, we will add the
ktlintCheck
step:- name: Run ktlintCheck run: ./gradlew ktlintCheck working-directory: ./chapterfourteen
In this code, we have added a step called
Run ktlintCheck
. This step will run thektlintCheck
command, which will check whether our code is formatted correctly. This step fails if our code is not formatted correctly. - Next, we add the
detekt
step:- name: Run detekt run: ./gradlew detekt working-directory: ./chapterfourteen
In this step, we run the
detekt
command, which will run the detekt checks on the code that we set up earlier in Chapter 11. This step fails...