Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #991

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #991

Workflow file for this run

name: Android CI
on:
push:
branches:
- master
- develop
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
concurrency:
group: android-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Android SDK License
run: yes | /usr/local/lib/android/sdk/tools/bin/sdkmanager --licenses
- name: Build with Gradle
run: ./gradlew :android:spotlessCheck :android:lint :android:build
- name: Upload build reports
uses: actions/upload-artifact@v2
with:
name: build-reports
path: '**/build/reports'
- name: Upload build mapping
uses: actions/upload-artifact@v2
with:
name: build-mapping
path: ./android/build/outputs/mapping
unit-test:
runs-on: ubuntu-latest
needs: build
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Android SDK License
run: yes | /usr/local/lib/android/sdk/tools/bin/sdkmanager --licenses
- name: Build with Gradle
run: ./gradlew :android:test
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-test-result
path: "**/build/test-results/**/*.xml"
connected-test:
runs-on: macOS-11
needs: build
timeout-minutes: 60
strategy:
# Allow tests to continue on other devices if they fail on one device.
fail-fast: false
matrix:
include:
- api-level: 30
target: google_apis
- api-level: 28
target: default
- api-level: 26
target: default
- api-level: 24
target: default
- api-level: 22
target: default
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Android SDK License
run: (while sleep 3; do echo "y"; done) | /Users/runner/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses
- name: Build tests
run: ./gradlew :android:assembleAndroidTest
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
timeout-minutes: 40
with:
api-level: ${{ matrix.api-level }}
profile: 4in WVGA (Nexus S)
ram-size: 2048M
target: ${{ matrix.target }}
script: |
adb logcat > logcat.txt &
./gradlew :android:connectedCheck
- name: Upload logs
if: always()
uses: actions/upload-artifact@v2
with:
name: logs-${{ matrix.api-level }}-${{ matrix.target }}
path: logcat.txt
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results-${{ matrix.api-level }}-${{ matrix.target }}
path: "**/build/outputs/**/connected/**/*.xml"