Reader small image

You're reading from  Mastering Kotlin for Android 14

Product typeBook
Published inApr 2024
Reading LevelIntermediate
PublisherPackt
ISBN-139781837631711
Edition1st Edition
Languages
Right arrow
Author (1)
Harun Wangereka
Harun Wangereka
author image
Harun Wangereka

Harun Wangereka is a Google Developer Expert for Android and an Android engineer with over seven years of experience and currently working at Apollo Agriculture. Harun is passionate about Android development, never tired of learning, building the tech community, and helping other developers upscale their skills. He is a co-organizer at Droidcon Kenya and a former Kotlin Kenya and Android254 co-organizer. Through these communities, he has been able to impact thousands of developers. He is also an Android author at Kodeco where he has written 8 articles, published a book; Saving Data on Android, Second Edition, and is also a video course instructor. He has given numerous sessions on Android and Kotlin across different communities worldwide.
Read more about Harun Wangereka

Right arrow

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:

  1. 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 the ktlintCheck command, which will check whether our code is formatted correctly. This step fails if our code is not formatted correctly.

  2. 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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Kotlin for Android 14
Published in: Apr 2024Publisher: PacktISBN-13: 9781837631711

Author (1)

author image
Harun Wangereka

Harun Wangereka is a Google Developer Expert for Android and an Android engineer with over seven years of experience and currently working at Apollo Agriculture. Harun is passionate about Android development, never tired of learning, building the tech community, and helping other developers upscale their skills. He is a co-organizer at Droidcon Kenya and a former Kotlin Kenya and Android254 co-organizer. Through these communities, he has been able to impact thousands of developers. He is also an Android author at Kodeco where he has written 8 articles, published a book; Saving Data on Android, Second Edition, and is also a video course instructor. He has given numerous sessions on Android and Kotlin across different communities worldwide.
Read more about Harun Wangereka