mirror of
https://github.com/Jellify-Music/App.git
synced 2025-12-30 15:29:49 -06:00
* Add support for --PR flag in getRandomVersion.sh * Add --PR flag to getRandomVersion.sh calls Updated getRandomVersion.sh call to include --PR flag for both Android and iOS bundle creation. * Update maestro-test.yml * Update maestro-test.yml * Update maestro-test.yml * Create sendDiscordMessage * Replace Fastlane notifications with Node script * Rename sendDiscordMessage to sendDiscordMessage.js * Update sendDiscordMessage.js * Update sendDiscordMessage.js * Fux * frf * fix * gg * fix: Fix incorrect return of on Web * fix: Fix Versioned URL
152 lines
4.4 KiB
YAML
152 lines
4.4 KiB
YAML
name: Run Maestro Tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 3 * * *"
|
|
|
|
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/
|
|
- uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.4' # Not needed with a .ruby-version, .tool-versions or mise.toml
|
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
|
|
- 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: bash scripts/maestro-android-retry.sh "https://jellyfin.jellify.app" "jerry"
|
|
|
|
|
|
- name: 🗣️ Notify Success on Discord
|
|
if: success()
|
|
run: |
|
|
node scripts/sendDiscordMessage.js "__**## ✅ Maestro Test Passed**__All checks completed successfully!"
|
|
env:
|
|
DISCORD_WEBHOOK_URL: ${{ secrets.MAESTRO_WEBHOOK_RESULTS }}
|
|
|
|
- name: 🗣️ Notify Failure on Discord
|
|
if: failure()
|
|
run: |
|
|
node scripts/sendDiscordMessage.js "__**## ❌ Maestro Test Failed**__Some tests did not pass."
|
|
env:
|
|
DISCORD_WEBHOOK_URL: ${{ secrets.MAESTRO_WEBHOOK_RESULTS }}
|
|
- name: Store tests result
|
|
uses: actions/upload-artifact@v4.3.4
|
|
if: always()
|
|
with:
|
|
name: TestResult
|
|
path: |
|
|
*.mp4
|