'Github CI, run pure Java tests on Android

A library I wanted to use failed in various ways on different versions of Android, so I added some patches to get it to work with the phones I had on hand. The author of the original repo would like to maintain continuous integration, though, so now I'm trying to figure out how to run pure Java tests on Android in Github's Workflows. I've found some things that seem related, but e.g. connectedAndroidTest isn't found, or the guide doesn't actually run the tests on Android and just makes an APK (which I'm not doing anyway), etc. How can I get Github to automatically check if all the Java tests succeed on (various versions of) Android, with as little code / unrelated configuration changed as possible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source