organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!
https://organicmaps.app
Apache License 2.0
8.58k stars 837 forks source link

[github] [ios] Implement test running for the ios-check debug job #7920

Closed kirylkaveryn closed 2 weeks ago

kirylkaveryn commented 2 weeks ago

This PR Implements the iOS test running for the ios-check workflow during the debug job.

Tested on the fork. Test running adds ~10 minutes to the workflow. This is happens because the testing process requires additional steps rather than just compiling the project:

  1. Build the project
  2. Build the tests
  3. Launch the app in the simulator
  4. Inject the tests into the running app
  5. Run the tests
  6. Quit the app
image
kirylkaveryn commented 2 weeks ago

Thanks!

  1. Does it make sense to store test logs as artifacts?
Test session results, code coverage, and logs:
  /Users/runner/Library/Developer/Xcode/DerivedData/omim-flvqchzzlvipeddxgcerkpudxndo/Logs/Test/Test-OMaps-2024.04.15_10-09-27-+0000.xcresult
  1. Is there a way to hide XCode compile output and only show it when compilation failed? It takes too much space in build log and it's hard to find any warnings or errors.

@biodranik I update the CI workflow and as result:

  1. When tests fails the .xcresult artifact will be created and attached to the result. If tests doesn't fail this step will be skipped and the artifact will not be adeed. Failed test run: https://github.com/kirylkaveryn/organicmaps/actions/runs/8720798226
image image

Not failed test run (artifact step is skipped): https://github.com/kirylkaveryn/organicmaps/actions/runs/8721380477/job/23924978475

image
  1. -quiet flag was added so the compilel will log only warnings and errors