Skip to content

Commit 20b48d5

Browse files
Update Android PR CI matrix to run on Default: 8, 17, and 21.
- Renamed 'current' matrix entry to 'Default: 8'. - Removed JDK 11 and 25 from the matrix as requested. - Updated conditional logic to skip artifact uploads (screenshots, coverage) for non-default runs to prevent conflicts. - Updated test runner script block to skip coverage generation for non-default runs. - Preserved existing logic for JDK setup and env vars for non-default runs.
1 parent 9d7eb95 commit 20b48d5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/scripts-android.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
jdk: ['current', '11', '17', '21', '25']
78+
jdk: ['Default: 8', '17', '21']
7979
permissions:
8080
contents: read
8181
pull-requests: write
@@ -87,16 +87,16 @@ jobs:
8787
steps:
8888
- uses: actions/checkout@v4
8989
- name: Setup JDK
90-
if: matrix.jdk != 'current'
90+
if: matrix.jdk != 'Default: 8'
9191
uses: actions/setup-java@v4
9292
with:
9393
java-version: ${{ matrix.jdk }}
9494
distribution: 'zulu'
9595
- name: Set JDK_HOME
96-
if: matrix.jdk != 'current'
96+
if: matrix.jdk != 'Default: 8'
9797
run: echo "JDK_HOME=${JAVA_HOME}" >> $GITHUB_ENV
9898
- name: Configure CN1SS options
99-
if: matrix.jdk != 'current'
99+
if: matrix.jdk != 'Default: 8'
100100
run: |
101101
echo "CN1SS_SKIP_COMMENT=1" >> $GITHUB_ENV
102102
echo "CN1SS_FAIL_ON_MISMATCH=1" >> $GITHUB_ENV
@@ -120,9 +120,11 @@ jobs:
120120
target: google_apis
121121
script: |
122122
./scripts/run-android-instrumentation-tests.sh "${{ steps.build-android-app.outputs.gradle_project_dir }}"
123-
./scripts/generate-android-coverage-report.sh "${{ steps.build-android-app.outputs.gradle_project_dir }}"
123+
if [ "${{ matrix.jdk }}" == "Default: 8" ]; then
124+
./scripts/generate-android-coverage-report.sh "${{ steps.build-android-app.outputs.gradle_project_dir }}"
125+
fi
124126
- name: Upload emulator screenshot
125-
if: always() # still collect it if tests fail
127+
if: always() && matrix.jdk == 'Default: 8'
126128
uses: actions/upload-artifact@v4
127129
with:
128130
name: emulator-screenshot
@@ -131,7 +133,7 @@ jobs:
131133
retention-days: 14
132134
compression-level: 6
133135
- name: Upload Android Jacoco coverage report
134-
if: always()
136+
if: always() && matrix.jdk == 'Default: 8'
135137
uses: actions/upload-artifact@v4
136138
with:
137139
name: android-jacoco-coverage

0 commit comments

Comments
 (0)