Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/compscidr/hello-java-android

"Hello Java-Android" with jacoco, junit5, codecov ready to go
https://github.com/compscidr/hello-java-android

android codecov jacoco java junit5

Last synced: 2 days ago
JSON representation

"Hello Java-Android" with jacoco, junit5, codecov ready to go

Awesome Lists containing this project

README

        

# hello-java-android
[![Build Status](https://github.com/compscidr/hello-java-android/workflows/Gradle%20Build/badge.svg)](https://github.com/compscidr/hello-java-android/actions) 
[![codecov](https://codecov.io/gh/compscidr/hello-java-android/branch/main/graph/badge.svg)](https://codecov.io/gh/compscidr/hello-java-android) 

When starting a new project, I always find getting the tools up and running quickly is a pain, so I
wanted something for java / android which already had everything setup and working.

This is a WiP inspired by a similar repo for Kotlin / Android: https://github.com/compscidr/hello-kotlin-android

In order to get instrumented test coverage, I'm using an android emulator container which is linked
to a self-hosted runner container: https://jasonernst.com/posts/2021/08/08/Android-Emulator-with-Github-Actions-on-Linux.

The other option is to use macos github hosted runners (emulator needs gpu accel to run in a reasonable time)
but I'm cheap and the macos instances are expensive and use all my actions credits too quickly.

This aims to be a starter repo with all of the following tooling setup:
* [Github actions](https://github.com/marketplace/actions/gradle-android)
* [Checkstyle]()
* [Junit5](https://junit.org/junit5/docs/current/user-guide/) (unit + integration tests)
* [Jacoco](https://www.eclemma.org/jacoco/)
* [Codecov](https://codecov.io/)

# Code coverage notes:
There are three different reports produced:
- one for debug unit tests (located in `app/build/reports/jacoco/jacocoTestReportDebug`)
- one for release unit tests (located in `app/build/reports/jacoco/jacocoTestReportRelease`)
- one for connected (on device / emulator tests) (located in `app/build/reports/coverage/androidTest/debug`)

In order to produce them all, just run:
`./gradlew connectedCheck && ./gradlew jacocoTestReport`