nowinandroid icon indicating copy to clipboard operation
nowinandroid copied to clipboard

🏭 Split GHA jobs and extract composite actions

Open SimonMarquis opened this issue 2 months ago • 6 comments

Main advantages:

  • improves GHA readability: less code in the main workflow files
  • improves maintainability: composite actions are self contained
  • reduces copy/paste mistakes & oversights (e.g. java version was set to 17 and 21)
  • slight increase in total build time, but reduces the perceived parallelized time.

Extracted composite actions:

  • setup-gradle
  • setup-gradle-managed-devices
  • setup-gradle-properties
  • setup-java
  • setup-kvm

Jobs split into more granular groups:

Current workflows
  • test_and_apk: :build-logic:convention:check, spotlessCheck, dependencyGuard, dependencyGuardBaseline, verifyRoborazziDemoDebug, recordRoborazziDemoDebug, testDemoDebug, :lint:test, :app:assemble, :app:lintProdRelease, :app-nia-catalog:lintRelease, :lint:lint, :app:checkProdReleaseBadging
  • androidTest: connectedDemoDebugAndroidTest, testDemoDebugUnitTest, createDemoDebugCombinedCoverageReport
New workflows
  • checks: :build-logic:convention:check, spotlessCheck, dependencyGuard, dependencyGuardBaseline, :app:checkProdReleaseBadging
  • assemble: :app:assemble
  • lint: :app:lintProdRelease, :app-nia-catalog:lintRelease, :lint:lint
  • unit-tests: verifyRoborazziDemoDebug, recordRoborazziDemoDebug, testDemoDebug, :lint:test
  • instrumented-tests: connectedDemoDebugAndroidTest, testDemoDebugUnitTest, createDemoDebugCombinedCoverageReport

For the required checked jobs, this fan-in method can be applied to simplify the required checks configuration.

SimonMarquis avatar Sep 14 '25 15:09 SimonMarquis