186 Commits

Author SHA1 Message Date
Don Turner
8ffffe5faf Update pull request template 2023-10-16 10:45:04 +01:00
Don Turner
93032b9e3a Fix for pull request template not being used. Fixes #769 2023-10-16 10:13:49 +01:00
Simon Marquis
78e55ed4ec Add :lint:test task to CI builds 2023-10-13 22:54:51 +02:00
renovate[bot]
e25f98df6e Update all dependencies 2023-10-11 17:02:02 +00:00
Don Turner
fe7de1cef9 Remove GMD from CI
Fixes #787
2023-10-03 18:53:28 +01:00
Don Turner
d2dea938fa Update pull_request_template.md
Added requirement that PRs contain a description
2023-10-03 15:40:08 +01:00
Simon Marquis
7133de7faa Remove .github/renovate.json 2023-09-20 17:37:48 +02:00
Simon Marquis
8d5984e843 Add "Kotlin - KSP - Compose" update group 2023-09-20 17:37:48 +02:00
Simon Marquis
8826c9cb42 Schedule weekly instead of daily as suggested 2023-09-20 17:37:47 +02:00
Simon Marquis
1c78acf73b Enable dependabot updates on a daily basis
using the `version update` label for gradle updates.
2023-09-20 17:37:47 +02:00
Simon Marquis
3797ea4290 Enable SARIF support on GitHub Actions
Splitted from the initial Lint rework in #759.
2023-08-24 09:24:38 +02:00
Milosz Moczkowski
ce7a303a2c Merge pull request #792 from SimonMarquis/gmd
Update GMD workflow
2023-08-23 15:47:36 +02:00
Milosz Moczkowski
c57fb78fa7 Merge pull request #759 from SimonMarquis/lint/sarif
Android Lint improvements
2023-08-23 13:59:44 +02:00
Jose Alcérreca
886158d3cb Adds Screenshot testing with Roborazzi (#876)
* 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>
2023-08-23 10:03:24 +02:00
Simon Marquis
d136965a0d Merge branch 'main' into lint/sarif 2023-06-22 20:17:17 +02:00
Simon Marquis
cc9b5a1634 Remove SARIF support 2023-06-22 20:17:09 +02:00
Simon Marquis
b7cb973c8d Update GMD workflow
- 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.
2023-06-10 14:12:56 +02:00
Simon Marquis
8e708cca05 Merge branch 'main' into lint/sarif 2023-06-09 09:00:36 +02:00
Simon Marquis
61098d75b2 Merge branch 'main' into patch-2 2023-06-09 08:58:11 +02:00
Simon Marquis
97a55c9dd5 Merge AndroidCIWithGmd.yaml into Build.yaml
Add dependency on the `build` job, and add the same timeout of 55 minutes.
Closes #761
2023-05-27 20:51:41 +02:00
Simon Marquis
04ddc86298 Enable checkDependencies and run lint tasks on project roots 2023-05-27 19:56:45 +02:00
Simon Marquis
ec7b7ac668 Call github/codeql-action/upload-sarif with the root folder as argument
It does not support path globbing.
2023-05-27 19:06:56 +02:00
Simon Marquis
8ea9a8fa51 Android Lint improvements
- 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.
2023-05-27 14:44:53 +02:00
Simon Marquis
ae50f3d332 Remove benchmark androidTest task exclusion
Task `:benchmark:connectedDemoBenchmarkAndroidTest` is not part of the `connectedDemoDebugAndroidTest` task graph and can therefore safely be removed.
2023-05-24 18:46:33 +01:00
Simon Marquis
cefac16445 Manually accept Android licenses instead of relying on third party action 2023-05-21 11:31:37 +01:00
Simon Marquis
deab03e217 Merge branch 'main' into SimonMarquis-patch-1 2023-05-04 21:41:07 +02:00
Simon Marquis
1e75be21e7 Add missing steps in AndroidCIWithGmd.yaml
- `gradle/wrapper-validation-action`
- copy CI's `gradle.properties` file

And restore explicit steps names.
2023-05-04 21:35:20 +02:00
Milosz Moczkowski
647b6f8b36 Merge pull request #570 from SimonMarquis/ci/androidTest
Improve `androidTest` step of `Build` action by pre-packaging apps before spawning the emulator
2023-05-04 15:19:58 +02:00
Don Turner
825c32941c Merge pull request #702 from SimonMarquis/gmd/ci-group
Create and use CI specific group of GMD devices
2023-05-03 11:33:52 +01:00
Don Turner
7c287c9c17 Merge pull request #703 from SimonMarquis/fix/instrumented-tests-reports
Fix instrumented test reports archives
2023-05-03 11:31:47 +01:00
Simon Marquis
1269b29aee Fix incomplete build reports
- 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)
2023-04-29 15:18:36 +02:00
Simon Marquis
cd6931d673 Fix instrumented test reports archives
- 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.
2023-04-29 14:52:32 +02:00
Simon Marquis
4550743fac Create and use CI specific group of GMD devices
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.
2023-04-29 12:49:08 +02:00
Simon Marquis
ef27c050b6 Add missing gradle/gradle-build-action setup in AndroidCIWithGmd.yaml
This will prevent downloading and unzipping Gradle distribution but fetch it from the cache instead like other workflows.
2023-04-29 12:49:08 +02:00
Simon Marquis
a68fe38411 Use dedicated build step to package test apps before spawning the emulator 2023-04-29 12:48:58 +02:00
Simon Marquis
42ba433be3 Add missing gradle/gradle-build-action setup in AndroidCIWithGmd.yaml
This will prevent downloading and unzipping Gradle distribution but fetch it from the cache instead like other workflows.
2023-04-26 23:43:03 +02:00
Simon Marquis
246d6c6528 Use dedicated build step to package test apps before spawning the emulator 2023-04-26 23:27:05 +02:00
Alex Vanyo
086dc957c0 Update to AGP 8.0
Change-Id: I27eb106e484e2003d732782a39612dc72c845282
2023-04-14 09:03:51 -07:00
Simon Marquis
e5d29547a1 Remove debug logs from CI workflow
Closes #584
2023-03-13 23:27:27 +00:00
Adetunji Dahunsi
9f1e1889cb Run build tests with the Demo variant 2023-02-14 08:24:13 -05:00
Alex Vanyo
ded79e617e Add Pixel C API 30 emulator to CI
Change-Id: If386c899496433d4e179111c0230905b36db7c50
2023-02-09 10:02:02 -08:00
Alex Vanyo
6146dd5576 Switch GMD to use a convention plugin
Change-Id: Ia4f94cd7533c9168752ee39e3f960108fe802ab4
2023-02-03 15:48:23 -08:00
Mohsen Rzna
46c1d510d4 Android-CI workflow -> GMD refactor (#537)
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
2023-01-20 12:40:03 +09:00
Takeshi Hagikura
4633609930 Introduce GMD + ATD (#479)
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
2023-01-10 18:15:34 +09:00
Don Turner
ab78c44e79 Remove API 23 from CI due to flakiness 2022-11-15 15:56:55 +00:00
Don Turner
dcf0bf475a Remove --stacktrace from CI as it's difficult to find the error
Change-Id: Ie7be474a24367b17658a04a281bf8051f3f5ffd1
2022-11-11 18:33:47 +00:00
Jolanda Verhoef
e117edeac2 Revert version upgrade of objenesis and protobuf-plugin 2022-11-04 12:13:47 +01:00
Jolanda Verhoef
a90b4db98a Merge pull request #381 from android/jv/renovate-setup
Setup Renovate to group all updates and update on a daily basis.
2022-11-02 10:24:38 +01:00
Jolanda Verhoef
6a409bbeec Setup Renovate to group all updates and update on a daily basis. 2022-10-31 17:00:02 +01:00
Don Turner
cb856b98f3 Increase emulator disk space to 6G in attempt to fix #354 2022-10-26 10:43:12 +01:00