Auto install and instrument sentry-okhttp instead of sentry-android-o… #506
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Matrix | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
publish-dry-run: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
agp: [ "7.0.4" ] | |
gradle: [ "7.2" ] | |
java: [ "11" ] | |
include: | |
- agp: "7.2.1" | |
gradle: "7.4" | |
java: "11" | |
- agp: "7.3.0" | |
gradle: "7.5" | |
java: "11" | |
- agp: "7.4.0" | |
gradle: "7.6" | |
java: "11" | |
- agp: "8.0.0" | |
gradle: "8.0.2" | |
java: "17" | |
- agp: "8.1.2" | |
gradle: "8.1" | |
java: "17" | |
- agp: "8.2.2" | |
gradle: "8.2" | |
java: "17" | |
- agp: "8.3.0" | |
gradle: "8.4" | |
java: "17" | |
- agp: "8.4.0-alpha11" | |
gradle: "8.6" | |
java: "17" | |
name: Test Matrix - AGP ${{ matrix.agp }} - Gradle ${{ matrix.gradle }} | |
env: | |
VERSION_AGP: ${{ matrix.agp }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Setup Java Version | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
# - name: Run ./gradlew (Fixes Gradle < 7.4) | |
# continue-on-error: true | |
# uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2 | |
# with: | |
# cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
# gradle-version: ${{ matrix.gradle }} | |
# arguments: tasks | |
- name: Build the Release variant | |
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
gradle-version: ${{ matrix.gradle }} | |
arguments: assembleRelease | |
- name: Check sentry-debug-meta.properties inside APKs | |
run: | | |
unzip ./examples/android-gradle/build/outputs/apk/release/android-gradle-release-unsigned.apk -d output | |
cat output/assets/sentry-debug-meta.properties | |
rm -r output | |
unzip ./examples/android-gradle-kts/build/outputs/apk/release/android-gradle-kts-release-unsigned.apk -d output | |
cat output/assets/sentry-debug-meta.properties | |
rm -r output | |
- name: Build the Release Bundle variant | |
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
gradle-version: ${{ matrix.gradle }} | |
arguments: bundleRelease | |
- name: Check sentry-debug-meta.properties inside App Bundle | |
run: | | |
unzip ./examples/android-gradle/build/outputs/bundle/release/android-gradle-release.aab -d output | |
cat output/base/assets/sentry-debug-meta.properties | |
rm -r output | |
unzip ./examples/android-gradle-kts/build/outputs/bundle/release/android-gradle-kts-release.aab -d output | |
cat output/base/assets/sentry-debug-meta.properties | |
rm -r output | |
- name: Run Integration Tests | |
uses: gradle/gradle-build-action@7e48093f71aa12588241894ff3695e83c4b5e4b0 # pin@v2.4.2 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
gradle-version: ${{ matrix.gradle }} | |
gradle-home-cache-includes: | | |
**/.gradle-test-kit/caches | |
arguments: integrationTest | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results-AGP${{ matrix.agp }}-Gradle${{ matrix.gradle }} | |
path: plugin-build/build/reports/tests/ | |
if: always() |