ReactiveCircus / android-emulator-runner

A GitHub Action for installing, configuring and running hardware-accelerated Android Emulators on macOS virtual machines.
Apache License 2.0
955 stars 188 forks source link

Actions fails without logs when I'm trying to run Detox tests #351

Closed limpbrains closed 10 months ago

limpbrains commented 11 months ago

Hi!

I'm trying to run our detox tests using reactivecircus/android-emulator-runner@v2, but it fails without any logs.

image

I'm testing React Native application. Also I'm running docker env at the same instance, could it be the issue? I tried to use larget github actions instance, but it doesn't help

Here is my github action:

name: e2e-android

on: pull_request

env:
  E2E_TESTS: 1 # build without transform-remove-console babel plugin
  DEBUG: 'lnurl* lnurl server'

jobs:
  e2e:
    runs-on: macos-12

    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 1

      - name: Setup Docker Default
        uses: docker-practice/actions-setup-docker@1.0.12
        timeout-minutes: 30

      - name: Run regtest setup
        run: cd docker && mkdir lnd && chmod 777 lnd && docker-compose up -d

      - name: Wait for bitcoind
        timeout-minutes: 2
        run: while ! nc -z '127.0.0.1' 43782; do sleep 1; done

      - name: Wait for electrum server
        timeout-minutes: 2
        run: while ! nc -z '127.0.0.1' 60001; do sleep 1; done

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: 18.17
          cache: 'yarn' # cache packages, but not node_modules

      - name: Activate enviroment variables
        run: cp .env.test.template .env

      - name: Activate react-native-skia-stub
        run: patch -p1 < .github/workflows/react-native-skia-stub.patch

      - name: Activate Gradle variables
        run: cp .github/workflows/gradle.properties ~/.gradle/gradle.properties

      - name: Use specific Java version for sdkmanager to work
        uses: actions/setup-java@v2
        with:
          distribution: 'temurin'
          java-version: '17'

      - name: Setup Gradle
        uses: gradle/gradle-build-action@v2

      - name: Yarn Install
        run: yarn --no-audit --prefer-offline || yarn --no-audit --prefer-offline
        env:
          HUSKY: 0

      - name: Build
        run: yarn e2e:build:android-release || yarn e2e:build:android-release

      - name: Test
        uses: reactivecircus/android-emulator-runner@v2
        with:
          api-level: 31
          profile: 5.4in FWVGA
          avd-name: Pixel_API_31_AOSP
          force-avd-creation: false
          emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
          arch: x86_64
          script: |
            adb root
            adb reverse tcp:80 tcp:80
            adb reverse tcp:8080 tcp:8080
            adb reverse tcp:9735 tcp:9735
            adb reverse tcp:10009 tcp:10009
            adb reverse tcp:28334 tcp:28334
            adb reverse tcp:28335 tcp:28335
            adb reverse tcp:28336 tcp:28336
            adb reverse tcp:39388 tcp:39388
            adb reverse tcp:43782 tcp:43782
            adb reverse tcp:60001 tcp:60001
            yarn e2e:test:android-release --record-videos all --take-screenshots all --record-logs all || \
            yarn e2e:test:android-release --record-videos all --take-screenshots all --record-logs all || \
            yarn e2e:test:android-release --record-videos all --take-screenshots all --record-logs all || \
            yarn e2e:test:android-release --record-videos all --take-screenshots all --record-logs all

      - uses: actions/upload-artifact@v3
        if: failure()
        with:
          name: e2e-test-videos
          path: ./artifacts/

      - name: Dump docker logs on failure
        if: failure()
        uses: jwalton/gh-docker-logs@v2

Link for the test run https://github.com/synonymdev/bitkit/actions/runs/6840167099/job/18599128701

limpbrains commented 10 months ago

I've found a lot of same reports related to macos github image. For example, https://github.com/actions/runner-images/issues/7509 I think it is not related to your project, closing the issue