Skip to content

Bump actions/setup-java from 3.11.0 to 4.2.0 #469

Bump actions/setup-java from 3.11.0 to 4.2.0

Bump actions/setup-java from 3.11.0 to 4.2.0 #469

Workflow file for this run

name: "Android CI"
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: Build & Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Fetch Source
uses: actions/checkout@v4
- name: Setup Java
uses: actions/[email protected]
with:
java-version: 11
distribution: 'adopt'
- name: Build & Test
run: ./gradlew build test
instrumentation-tests:
name: Instrumentation Tests
runs-on: macos-latest
timeout-minutes: 30
strategy:
# Allow tests to continue on other devices if they fail on one device.
fail-fast: false
matrix:
api-level:
- 33
steps:
- name: Fetch Source
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: 11
distribution: 'adopt'
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
script: adb logcat *:S TestRunner:V & ./gradlew connectedCheck --no-build-cache --no-daemon --stacktrace
instrumentation-test-summary:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Instrumentation Test Matrix Summary
needs: instrumentation-tests
steps:
- name: Check build matrix status
if: ${{ needs.instrumentation-tests.result != 'success' }}
run: exit 1
publish-snapshot:
name: Publish OSS Sonatype Snapshot
runs-on: ubuntu-latest
if: "github.event_name == 'push'"
needs:
- build
- instrumentation-test-summary
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure JDK
uses: actions/[email protected]
with:
java-version: 11
distribution: 'adopt'
- name: Upload Snapshot
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGNING_KEY_ID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}