Skip to content

dependabot merges

dependabot merges #13

name: coverage-androidTest-app
on:
push:
# This should disable running the workflow on tags, according to the
# on.<push|pull_request>.<branches|tags> GitHub Actions docs.
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CACHE_VERSION: 1
jobs:
fdroid:
name: fdroid
runs-on: macOS-latest
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
api-level: [29]
steps:
- name: clone
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- run: ./ci_clear_gradle_cache.sh
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
- name: Get AVD info
uses: ./.github/actions/get-avd-info
id: avd-info
with:
api-level: ${{ matrix.api-level }}
- uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }}
- name: Create AVD snapshot
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
disable-animations: false
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot."
- name: local.properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties
- name: google-services.json
env:
GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }}
run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json
- name: androidTest
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
disable-animations: true
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: |
adb logcat -c
adb logcat > logcat.txt &
./gradlew emptyMediaStore :app:connectedFdroidDebugAndroidTestCoverage -PgitHubAction --stacktrace
- name: artifact logcat
if: always()
uses: actions/upload-artifact@v3
with:
name: app.androidTest.fdroid-logcat-${{ matrix.api-level }}
path: logcat.txt
- name: artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: app.androidTest.fdroid-${{ matrix.api-level }}
path: |
**/build/reports/*
**/build/outputs/*/connected/*
- name: publish
run: |
set -x
find . -name "*.exec"; find . -name "*.ec"; find app/build/reports/ -name "*.xml"
bash <(curl https://codecov.io/bash) -t ${{ secrets.CODECOVIO_TOKEN }} -f app/build/reports/FdroidDebug.xml -F app.androidTest.fdroid
googleplay:
name: googleplay
runs-on: macOS-latest
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
api-level: [29]
steps:
- name: clone
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- run: ./ci_clear_gradle_cache.sh
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }}
- name: Get AVD info
uses: ./.github/actions/get-avd-info
id: avd-info
with:
api-level: ${{ matrix.api-level }}
- uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }}
- name: Create AVD snapshot
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
disable-animations: false
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot."
- name: local.properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: |
echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties
- name: google-services.json
env:
GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }}
run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json
- name: androidTest
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: ${{ steps.avd-info.outputs.arch }}
target: ${{ steps.avd-info.outputs.target }}
disable-animations: true
force-avd-creation: false
ram-size: 4096M
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: |
adb logcat -c
adb logcat > logcat.txt &
./gradlew emptyMediaStore :app:connectedGoogleplayDebugAndroidTestCoverage -PgitHubAction --stacktrace
- name: artifact logcat
if: always()
uses: actions/upload-artifact@v3
with:
name: app.androidTest.googleplay-logcat-${{ matrix.api-level }}
path: logcat.txt
- name: artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: app.androidTest.googleplay-${{ matrix.api-level }}
path: |
**/build/reports/*
**/build/outputs/*/connected/*
- name: publish
run: |
set -x
find . -name "*.exec"; find . -name "*.ec"; find app/build/reports/ -name "*.xml"
bash <(curl https://codecov.io/bash) -t ${{ secrets.CODECOVIO_TOKEN }} -f app/build/reports/GoogleplayDebug.xml -F app.androidTest.googleplay