Skip to content

Add API 34 tests

Add API 34 tests #300

Workflow file for this run

name: build
on: [push, pull_request]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
jvm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 19
- uses: gradle/gradle-build-action@v2
- name: Test
run: ./gradlew build
android:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
api-level:
- 21
- 24
- 26
- 34
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Run Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.api-level == '34' && 'x86_64' || 'x86' }}
script: ./gradlew connectedCheck
env:
API_LEVEL: ${{ matrix.api-level }}
robovm:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- uses: gradle/gradle-build-action@v2
- name: Run Tests
run: ./gradlew retrofit:robovm-test:robovmTest
publish:
runs-on: ubuntu-latest
if: github.repository == 'square/retrofit' && github.ref == 'refs/heads/master'
needs:
- jvm
- android
- robovm
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 19
- uses: gradle/gradle-build-action@v2
- name: Upload Artifacts
run: ./gradlew publish
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}