Skip to content

Commit

Permalink
Run agp test matrix against UI test app
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn committed May 8, 2023
1 parent b52343e commit 762b5ae
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 118 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/agp-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,41 @@ jobs:
strategy:
fail-fast: false
matrix:
agp: ['8.0.0-rc01','8.1.0-alpha11']
agp: ['8.0.0','8.1.0-alpha11']

name: AGP Matrix Sample Release - AGP ${{ matrix.agp }}
env:
VERSION_AGP: ${{ matrix.agp }}
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}

steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Gradle
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # pin@v2

- name: Setup Java Version
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'

- name: Build the Release variant
uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 # pin@v2
# Clean, build and release a test apk
- name: Make assembleUiTests
run: make assembleUiTests

# We stop gradle at the end to make sure the cache folders
# don't contain any lock files and are free to be cached.
- name: Make stop
run: make stop

- name: Run Tests in SauceLab
uses: saucelabs/saucectl-run-action@f401339df4c4b84945783f16b45fd545ac52a2eb # pin@v3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
arguments: sentry-android-integration-tests:sentry-test-agp:assembleRelease
sauce-username: ${{ secrets.SAUCE_USERNAME }}
sauce-access-key: ${{ secrets.SAUCE_ACCESS_KEY }}
config-file: .sauce/sentry-uitest-android-ui.yml
if: env.SAUCE_USERNAME != null
2 changes: 1 addition & 1 deletion sentry-android-core/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@

# Keep any custom option classes like SentryAndroidOptions, as they're loaded via reflection
# Also keep method names, as they're e.g. used by native via JNI calls
-keep class * extends io.sentry.SentryOptions { *; }
#-keep class * extends io.sentry.SentryOptions { *; }

##---------------End: proguard configuration for android-core ----------
2 changes: 1 addition & 1 deletion sentry-android-integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
* [App metrics test specification (yaml)](./metrics-test.yml)
* [Espresso-based benchmarks](./sentry-uitest-android-benchmark) - run within SauceLabs (see /.sauce/*.yml)
* [Espresso-based UI tests](./sentry-uitest-android) - run within SauceLabs (see /.sauce/*.yml)
* [Sample app for testing against AGP compatibility matrix](./sentry-test-agp)
* Also used for compatibility test matrix against new AGP versions

This file was deleted.

64 changes: 0 additions & 64 deletions sentry-android-integration-tests/sentry-test-agp/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ dependencies {

implementation(projects.sentryAndroid)
implementation(projects.sentryCompose)
implementation(projects.sentryAndroidOkhttp)
implementation(projects.sentryAndroidFragment)
implementation(projects.sentryAndroidTimber)
implementation(Config.Libs.appCompat)
implementation(Config.Libs.androidxCore)
implementation(Config.Libs.composeActivity)
Expand All @@ -101,6 +104,8 @@ dependencies {
implementation(Config.Libs.androidxRecylerView)
implementation(Config.Libs.constraintLayout)
implementation(Config.TestLibs.espressoIdlingResource)
implementation(Config.Libs.timber)
implementation(Config.Libs.retrofit2)

compileOnly(Config.CompileOnly.nopen)
errorprone(Config.CompileOnly.nopenChecker)
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ include(
"sentry-android-integration-tests:sentry-uitest-android-benchmark",
"sentry-android-integration-tests:sentry-uitest-android",
"sentry-android-integration-tests:test-app-plain",
"sentry-android-integration-tests:test-app-sentry",
"sentry-android-integration-tests:sentry-test-agp"
"sentry-android-integration-tests:test-app-sentry"
)

gradle.beforeProject {
Expand Down

0 comments on commit 762b5ae

Please sign in to comment.