mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-06 02:50:30 -06:00
133 lines
3.6 KiB
YAML
133 lines
3.6 KiB
YAML
name: Run Maestro Tests
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: macos-15
|
|
outputs:
|
|
version: ${{ steps.setver.outputs.version }}
|
|
steps:
|
|
- name: 🛒 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🖥 Setup Node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'yarn'
|
|
|
|
- name: 💎 Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.0'
|
|
bundler-cache: true
|
|
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
node_modules
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
~/.cache/turbo
|
|
android/.gradle
|
|
android/app/build
|
|
key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/yarn.lock', '**/build.gradle') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-turbo-
|
|
|
|
- name: 🍎 Run yarn init-android
|
|
run: yarn install --network-concurrency 1
|
|
|
|
- name: 💬 Disable OTA Updates and Enable Maestro Build
|
|
run: node scripts/updateEnv.js OTA_UPDATE_ENABLED=false IS_MAESTRO_BUILD=true
|
|
|
|
|
|
- name: ✅ Validate Config Files
|
|
run: |
|
|
node -e "JSON.parse(require('fs').readFileSync('telemetrydeck.json'))"
|
|
node -e "JSON.parse(require('fs').readFileSync('glitchtip.json'))"
|
|
|
|
- name: 🚀 Run Android fastlane build
|
|
run: yarn android-build
|
|
|
|
- name: 📤 Upload Android Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: android-artifacts
|
|
path: ./android/app/build/outputs/apk/release/*.apk
|
|
|
|
|
|
run-maestro-tests:
|
|
runs-on: ubuntu-latest
|
|
needs: build-android
|
|
|
|
|
|
steps:
|
|
- name: 🛒 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🖥 Setup Node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Installing Maestro
|
|
shell: bash
|
|
run: export MAESTRO_VERSION=1.40.0; curl -Ls "https://get.maestro.mobile.dev" | bash
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'zulu'
|
|
|
|
- name: 💎 Set up Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.0'
|
|
bundler-cache: true
|
|
|
|
- name: ⬇️ Download Android Artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: android-artifacts
|
|
path: artifacts/
|
|
|
|
- name: Enable KVM group perms
|
|
shell: bash
|
|
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 e2e tests
|
|
id: run-tests
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: '34'
|
|
target: google_apis
|
|
arch: x86_64
|
|
profile: Nexus 6
|
|
ram-size: '8192M'
|
|
heap-size: '4096M'
|
|
disk-size: '10G'
|
|
cores: '4'
|
|
disable-animations: false
|
|
avd-name: e2e_emulator
|
|
script: |
|
|
node scripts/maestro-android.js "https://jellyfin.jellify.app" "jerry"
|
|
- name: Store tests result
|
|
uses: actions/upload-artifact@v4.3.4
|
|
if: always()
|
|
with:
|
|
name: TestResult
|
|
path: |
|
|
*.mp4
|