* Remove legacy benchmark build type
Now that we have the baseline profile gradle plugin,
there is no need for a benchmark build type.
The plugin does the setup and configuration and runs against the
correct app flavor.
* Remove explicit benchmark build type from benchmark module
* Remove stale build task exclusions
* Fix tracing import location
FYI @mlykotom
* Run dependencyGuard task during CI
Run the `dependencyGuard` task during CI, which will fail if there are
detected changes.
Change-Id: If5f2b18a4c765bd38a3353df2adaaa91cf1739c3
* Add actions to update dependency guard baselines
* Update baselines
* Better glob for update baselines action
Baseline profile generation is disabled for the PR level Build task. Release tasks require a fresh baseline profile. A new profile is generated using the baseline profile Gradle plugin.
* Prepare for usage of dex layout optimizations which can be actively used once NiA switches to AGP 8.2+.
* Add GMD config to release build
* Switch to macos-latest
* Update names for StartupBenchmark tests to better reflect states
* Stable release and recent GMD device
* Reduce flakiness by adding wait to benchmark
* More convenient waiting for objects
* Rename junit dependency to androidx-junit
* Only run baseline profile benchmarks during GH workflow
* Enable automatic BP generation for only release builds
* Disable BP generation from Build workflow
* Specify modules and skip benchmarking Build workflow
Bug: b/299334172
* Moved protobuf to separate module to avoid having to wire KSP's Plugin with the Protobuf Plugin.
* `@Binds` function cannot be an extension function.
* Commented `kotlin.compiler.execution.strategy=in-process` in CI to circumvent OOMs due to increased metaspace usage.
* [CI] Runs build in macos to generate a cache for androidTest runs
* Build projects before running emulator
* Fixes flaky coroutines test
* Moves spotless up in local tests job
* Enables config cache by setting problems to warn. Fixes#1022
* Adds screenshot tests using Roborazzi (Robolectric Native Graphics)
- Adds Roborazzi to convention plugins
- Adds Screenshot helper in :core-testing
- Creates screenshot suites for :app and :feature-foryou
* CI and spotless
* Moves :app tests to testDemo and makes NiaAppScreenSizesScreenshotTests prettier
* CI: Moves local tests to their own step
* CI: Adds --rerun to screenshot task
* CI: Moves screenshots before local tests
* CI: Fixes wrong if statement in workflow
* CI WIP: trying to trigger the push step
* CI: Re-enables roborazzi verification
* Fixes flaky screenshot tests by setting LocalInspectionMode on
* CI: screenshot commits now use the original author intead of bot account
* CI: Disables globbing because file_pattern didn't work
* CI: Trying new file pattern for png files
* CI: Adds a check for forks
* 🤖 Updates screenshots
* Code review: toml cleanup, comments
* Use new github.event.pull_request.head.repo.fork
Co-authored-by: Simon Marquis <contact@simon-marquis.fr>
* Uses Robolectric qualifiers to set the dpi, adds section to README
* Spotless
* Delegates creation of repository to Hilt in test
* Revert "Use new github.event.pull_request.head.repo.fork"
* 🤖 Updates screenshots
* Empty commit to trigger GHA on main branch
* Makes time zones deterministic in screenshot tests
* Increases GMD timeout to 90m, but it has to be reduced
---------
Co-authored-by: Simon Marquis <contact@simon-marquis.fr>
- Add `--no-parallel --max-workers=1` (was not able to trigger the error locally whit this combination).
- Remove useless `cleanManagedDevices` as devices are not persisted across runs.
- Rename test reports artifact to `test-reports-GMD` similar to `test-reports-${{ matrix.api-level }}`.
- Print disk space usage in case of failure.
- Create `LintConventionPlugin` to configure Lint on all compatible modules: Android applications, Android libraries and JVM modules.
- Run `lintProdRelease` in CI instead of the default `lintDemoDebug` which is less important compared to production code.
- Rearrange CI steps to make it more clear that Lint should is an additional step after build (build -> test -> lint).
- Enable SARIF support and upload results to GitHub's CodeQL to get inline feedback on PRs.
If we really need better perfs, we could restore `lint.checkDependencies = true` on the `:app` module and only execute `:app:lintProdRelease`.
But in practice, this does not change the total build time on this project.
- Add all generated lint reports (only app was archived)
- Add all unit tests reports (none were archived)
- Add all APKs (missing app-nia-catalog) and remove unnecessary files (logs, sdkDependencies, proguard's config/mapping/seeds etc. which are also quite large compared to APKs)
- Fixes missing tests reports from `AndroidCIWithGmd.yaml`
```
Warning: No files were found with the provided path: '**/*/build/reports/androidTests/'. No artifacts will be uploaded.
```
- Fixes missing tests reports from `Build.yaml`, where only top-level tests from `:app` were reported.
This should reduce the total CI time of `AndroidCIWithGmd` workflow.
Using the matrix strategy at the GitHub Actions level forces us to run the tests sequentially and download/rebuild everything from scratch at each iteration.
This PR is about updating the operating system to macOS-12 as the previous one was going to be deprecated, as well as updating the checkout to v3 to avoid the warnings in the panel; adding setup SDK action to accept the license which was missing from the beginning.
I also added imports instead of adding them directly with the codes.
As a reference, there was another PR with a similar topic, but it wasn't complete: #483
Introduce Gradle Managed Device definitions to modules that have instrumented tests.
At the moment, defining it as a convention plugin isn't possible due to the bug. That bug is now fixed and will be included in Android Studio Flamingo.
Once Flamingo becomes stable, convert the GMD definitions as a convention plugin (#523)
Change-Id: I0866369e3d0bbe148ca5ec1f92bad59239a347b8
Enables Gradle configuration cache.
Fix "no name set for build-config" warning.
Fix printing of test APKs due to AGP 7.3 changes
Change-Id: I65ec0cb9eba3d047417fc512ffeb66d378ba0c75
Using gradle/gradle-build-action which takes care of caching, we can remove the custom checksum calculation and files.
Change-Id: I190e4f911f6fa70199fd75a7335df12983157516