Skip to content

Upgrade dependency #939

Upgrade dependency

Upgrade dependency #939

Workflow file for this run

name: Code Coverage Check
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
codeCoverage:
# https://github.com/ReactiveCircus/android-emulator-runner/issues/386
runs-on: macos-13
strategy:
matrix:
api-level: [30]
# API 30+ emulators only have x86_64 system images.
arch: ["x86_64"]
target: [default] # Other option: google_apis
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Download amazon-chime-sdk-media binary from AWS S3
- name: Get Media binary from AWS S3
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} --profile jenkins-automated-test
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} --profile jenkins-automated-test
aws \
--profile jenkins-automated-test \
s3api get-object \
--bucket amazon-chime-sdk-android-internal \
--key master/media/latest/amazon-chime-sdk-media.tar.gz \
amazon-chime-sdk-media.tar.gz
tar -xzf amazon-chime-sdk-media.tar.gz
mkdir -p ./amazon-chime-sdk/libs
mv amazon-chime-sdk-media.aar ./amazon-chime-sdk/libs
# Download amazon-chime-sdk-machine-learning binary from AWS S3
- name: Get Machine Learning binary from AWS S3
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} --profile jenkins-automated-test
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} --profile jenkins-automated-test
aws \
--profile jenkins-automated-test \
s3api get-object \
--bucket amazon-chime-sdk-android-internal \
--key master/machine-learning/latest/amazon-chime-sdk-machine-learning.tar.gz \
amazon-chime-sdk-machine-learning.tar.gz
tar -xzf amazon-chime-sdk-machine-learning.tar.gz
mkdir -p ./amazon-chime-sdk/libs
mv amazon-chime-sdk-machine-learning.aar ./amazon-chime-sdk/libs
- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.target }}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.target }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
# Execute unit tests
- name: Unit Test with Android Emulator Runner
uses: reactiveCircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.target }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew jacocoTestReport --stacktrace
# Upload code coverage report to codecov to process data
- name: Upload coverage to Codecov
uses: codecov/[email protected]