Skip to content

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

License

Notifications You must be signed in to change notification settings

compscidr/hello-java-android

Repository files navigation

hello-java-android

Build Status  codecov 

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:

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published