Skip to content

build: add sdk 30-34 to connectedChecks #114

build: add sdk 30-34 to connectedChecks

build: add sdk 30-34 to connectedChecks #114

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- '*'
paths-ignore:
- 'README.md'
jobs:
spotless:
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: Spotless
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: spotlessCheck
env:
DEPENDENCY_GITHUB_PACKAGES_PASSWORD: ${{ secrets.DEPENDENCY_GITHUB_PACKAGES_PASSWORD }}
run: |
./gradlew spotlessCheck
assembleDebug:
needs: spotless
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: AssembleDebug
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- name: assembleDebug -x test
env:
DEPENDENCY_GITHUB_PACKAGES_PASSWORD: ${{ secrets.DEPENDENCY_GITHUB_PACKAGES_PASSWORD }}
run: |
./gradlew --scan --stacktrace \
assembleDebug -x test
- uses: actions/upload-artifact@v2
with:
name: build-files
path: |
./*/build/
retention-days: 1
testDebug:
needs: [ assembleDebug]
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: TestDebug
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- uses: actions/download-artifact@v2
with:
name: build-files
- name: testDebug
env:
DEPENDENCY_GITHUB_PACKAGES_PASSWORD: ${{ secrets.DEPENDENCY_GITHUB_PACKAGES_PASSWORD }}
run: |
./gradlew testDebug
lintDebug:
needs: [ assembleDebug ]
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: LintDebug
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- uses: actions/download-artifact@v2
with:
name: build-files
- name: lintDebug
env:
DEPENDENCY_GITHUB_PACKAGES_PASSWORD: ${{ secrets.DEPENDENCY_GITHUB_PACKAGES_PASSWORD }}
run: |
./gradlew lintDebug
connectedCheck:
needs: [ assembleDebug]
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
name: ConnectedCheck
runs-on: macOS-latest # enables hardware acceleration in the virtual machine
timeout-minutes: 60
strategy:
matrix:
api-level: [ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 ]
steps:
- uses: actions/checkout@v2
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: gradle-${{ runner.os }}-${{ hashFiles('**/build.gradle') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
- uses: actions/download-artifact@v2
with:
name: build-files
- name: Determine emulator arch
id: determine-arch
env:
API_LEVEL: ${{ matrix.api-level }}
run: |
ARCH="x86"
if [ "$API_LEVEL" -ge "31" ]; then
ARCH="x86_64"
fi
echo "ARCH=$ARCH" >> $GITHUB_OUTPUT
- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.determine-arch.outputs.ARCH }}
disable-animations: true
script: ./gradlew connectedCheck