Skip to content

Android + Jacobo + test coverage + GitHub actions + Codecov

License

Notifications You must be signed in to change notification settings

lixw1021/Code-Coverage-Test-App

Repository files navigation

Code-Coverage-Test-App codecov

Android + Jacoco + GitHub Actions + Codecov

Introduction

This is an Android App used to introduce Unit Test Coverage for Android project.

The project is using Jacoco to generate code coverage report, Github Actions run and upload coverage report to Codecov. Codecov provides different features, like Source Code Coverage, Pull Request Comments, Status Checks, Badges, Report Merging, GitHub Checks and etc. Take a look at different PRs to see how it works during code review.

Guide

Generate Coverage Reports

Add Jacoco plugin and dependency, and then create a jacocoReport task in build.gradle, run the following command to generate coverage reports which can be found in project's dir: app/build/reports/jacoco.

./gradlew jacocoReport

This is used to generate jacoco report in your android studio, you don't have to do anything if you only view it in codecov, because it runs in github workflow

Upload Coverage Reports to Codecov

Github Actions is used to run the jacocoReport and upload report to codecov, you can find the workflows file in jacoco.yml

View Detailed Report in Codecov

Signup account in codecov and add your repo into codecov account. Where you can find detailed coverage report based on projet, Commits, Branches, Pull Requests, Diff and etc.

Screen Shot 2021-06-13 at 10 23 38 PMScreen Shot 2021-06-13 at 10 23 58 PM

View Detailed Report in Github with sourcegraph

Screen Shot 2021-06-13 at 10 29 13 PM

License

The source code for the site is licensed under the MIT license, which you can find in the LICENSE file.

About

Android + Jacobo + test coverage + GitHub actions + Codecov

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages