chore(deps): update dependency com.osacky.doctor to v0.9.1 #706
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Data layer integration tests | |
on: | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | |
required: false | |
default: false | |
merge_group: | |
push: | |
branches: | |
- 'develop' | |
pull_request: | |
concurrency: | |
group: 'ci-${{ github.event.merge_group.head_ref || github.head_ref }}-${{ github.workflow }}' | |
cancel-in-progress: true | |
jobs: | |
data-layer-integration-tests: | |
name: Data layer integration tests run against Firebase emulator in Docker | |
# Use macos because GH linux runners don't have nested virtualization | |
# Which is required to use gradle managed devices | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
# api-level: [ 30 ] | |
# target: [ google_apis ] | |
include: | |
- api-level: 30 | |
target: google_atd | |
steps: | |
- name: Setup docker | |
uses: crazy-max/ghaction-setup-docker@v2 | |
env: | |
SIGN_QEMU_BINARY: 1 | |
- name: Install coreutils | |
run: | | |
brew install coreutils | |
timeout --version | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/develop' }} | |
gradle-home-cache-cleanup: true | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-${{ matrix.api-level }}-${{ 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: | |
profile: "Galaxy Nexus" | |
api-level: ${{ matrix.api-level }} | |
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." | |
## Build before running tests | |
- name: Build instrumented integration tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/develop' }} | |
arguments: | | |
:app:packageDebug :integration-tests:firebase:packageDebug | |
- name: Start Firebase emulator and wait for it to be ready | |
id: start-emulator | |
run: scripts/start-firebase-emulator-in-docker-and-wait-for-ready.sh | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
- name: Run instrumented integration tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
profile: "Galaxy Nexus" | |
api-level: ${{ matrix.api-level }} | |
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: | | |
# Workaround for https://github.com/ReactiveCircus/android-emulator-runner/issues/319 | |
adb uninstall "com.omricat.maplibrarian.integrationtesting.debug" || true | |
adb uninstall "com.omricat.maplibrarian.debug" || true | |
./gradlew installDebug | |
./scripts/capture-logcat-logs.sh ./scripts/run-instrumented-integration-tests.sh | |
- name: Extract logs from firebase emulator container | |
if: ${{ always() }} | |
run: | | |
mkdir -p ./build/logs/firebase-emulator | |
docker cp "firebase-emulator:/home/firebase-emulator" ./build/logs/firebase-emulator | |
- name: Upload firebase emulator logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: firebase-debug-logs-api-${{ matrix.api-level }}-${{ matrix.target }} | |
path: ./build/logs/firebase-emulator/**/*.log | |
- name: Upload test results/logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: instrumentation-test-results-api-${{ matrix.api-level }}-${{ matrix.target }} | |
path: | | |
./**/build/logs/logcat.log | |
./**/build/reports/androidTests/connected/** | |
./**/build/outputs/androidTest-results/** | |
./**/build/outputs/connected_android_test_additional_output/** | |