76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: Patch E2E Tests
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# At the end of every day
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
|
android:
|
|
runs-on: macos-latest
|
|
|
|
env:
|
|
SHOREBIRD_TOKEN: ${{ secrets.SHOREBIRD_TOKEN }}
|
|
SHOREBIRD_HOSTED_URL: https://api-dev.shorebird.dev
|
|
|
|
steps:
|
|
- name: 📚 Git Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: 🖥️ Add Shorebird to PATH
|
|
shell: bash
|
|
run: echo "${GITHUB_WORKSPACE}/bin/" >> $GITHUB_PATH
|
|
|
|
- name: 🐦 Verify Shorebird Installation
|
|
run: |
|
|
if [[ $(shorebird --version) =~ "Engine • revision" ]]; then
|
|
echo '✅ Shorebird CLI is installed!'
|
|
else
|
|
echo '❌ Shorebird CLI is not installed.'
|
|
exit 1
|
|
fi
|
|
shell: bash
|
|
|
|
- name: ☕ Set up Java
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: "temurin"
|
|
java-version: "17"
|
|
|
|
- name: 🎯 Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
flutter-version: 3.13.9
|
|
cache: true
|
|
|
|
- name: 🤖 AVD Cache
|
|
uses: actions/cache@v3
|
|
id: avd-cache
|
|
with:
|
|
path: |
|
|
~/.android/avd/*
|
|
~/.android/adb*
|
|
key: avd-29
|
|
|
|
- name: 🤖 Cache AVD Snapshot
|
|
if: steps.avd-cache.outputs.cache-hit != 'true'
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 29
|
|
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"
|
|
|
|
- name: 🧪 Patch E2E Tests
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 29
|
|
script: ./scripts/patch_e2e.sh
|