diff --git a/.github/workflows/adb-check.yml b/.github/workflows/adb-check.yml new file mode 100644 index 0000000000..3885d2479e --- /dev/null +++ b/.github/workflows/adb-check.yml @@ -0,0 +1,46 @@ +name: ADB Check (Temporary) + +on: push + +jobs: + test-e2e-android: + name: Run tests on Android + runs-on: ["self-hosted", "Linux", "X64"] + + steps: + - uses: actions/checkout@v4 + - uses: android-actions/setup-android@v3 + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - uses: actions/download-artifact@v4 + with: + name: built-e2e-apk + path: android/app/build/outputs + repository: GaloyMoney/galoy-mobile + run-id: 7906826525 + + - uses: actions/setup-node@v2 + with: + node-version: 20 + - run: npm i -g yarn + + - uses: actions/cache@v2 + with: + path: | + node_modules + ios/Pods + key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock', '**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-deps- + + - run: yarn install + - name: Run Android Emulator + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 29 + script: yarn e2e:test android.emu.debug --headless -d -R 3 diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5db8a9d7c8..b2eb609fba 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,6 +1,9 @@ name: E2E -on: [pull_request] +on: + release + # pull_request: + # branches: [main] jobs: build-e2e-android: @@ -83,6 +86,12 @@ jobs: yarn start & echo "METRO_PID=$!" >> $GITHUB_ENV + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Run Detox Tests (test attempt 1) continue-on-error: true id: test1 @@ -90,7 +99,7 @@ jobs: with: api-level: 29 avd-name: Pixel_API_29_AOSP - force-avd-creation: false + force-avd-creation: true arch: x86_64 script: yarn e2e:test android.emu.debug --headless -d -R 3 --take-screenshots all --record-videos all --record-logs all --headless @@ -123,7 +132,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: recordings + name: android-recordings path: artifacts - name: Destroy backend @@ -205,7 +214,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: recordings + name: ios-recordings path: artifacts - run: killall Simulator