spacecowboy / NotePad

Now under new management
GNU General Public License v3.0
382 stars 158 forks source link

get the github test action to work consistently #424

Closed CampelloManuel closed 6 months ago

CampelloManuel commented 1 year ago

The github action for running tests, https://github.com/spacecowboy/NotePad/actions/workflows/android_tests.yml , barely works.

This issue is for discussing all related problems, solutions and notes.

The test matrix is configured to continue even if a test configuration fails, so it appears as successful in any case. The goal is to make all tests complete consistently in API 23, 28, 32 devices, either with default or google_apis images. Most tests fail due to issues outside our control, mostly due to how slow the emulator is.

More info in the comments here:

This is not a priority: as long as tests work under 1 of the 10 configurations, it's fine for us.

Under a "run's page", like this https://github.com/spacecowboy/NotePad/actions/runs/3595460269 , you can download logs, video recordings & screenshots of the emulator. Included is also a folder of HTML pages produced by gradle: they show any exception that made a test crash

I should also configure it to run the tests in tablet mode. Find a tablet profile in the SDK with low screen resolution and use that.

See https://github.com/ViliusSutkus89/TestingStorageAccessFrameworkClients/blob/master/.github/workflows/build.yml

CampelloManuel commented 6 months ago

Update: recent android SDK version provide an image optimized for testing. Using this image in Github Actions makes the tests more reliable, but some still fail because the infrastructure is just too slow. Since this is the best result that we can get with the available technology, I have to consider this as solved.