Skip to content

chore(repo): fix release-pr skill step order and add a git-dep pre-flight check #488

chore(repo): fix release-pr skill step order and add a git-dep pre-flight check

chore(repo): fix release-pr skill step order and add a git-dep pre-flight check #488

Workflow file for this run

name: E2E Tests
on:
workflow_dispatch:
inputs:
android:
description: "Run Android e2e tests"
type: boolean
default: true
ios:
description: "Run iOS e2e tests"
type: boolean
default: true
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
jobs:
allure_launch_android:
if: github.event_name != 'workflow_dispatch' || inputs.android
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
launch_id: ${{ steps.launch.outputs.launch_id }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/allure-launch
id: launch
with:
working-directory: sample_app/android
allure_launch_ios:
if: github.event_name == 'workflow_dispatch' && inputs.ios
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
launch_id: ${{ steps.launch.outputs.launch_id }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/allure-launch
id: launch
with:
working-directory: sample_app/ios
android:
# Always on pull_request; opt-out via the checkbox on workflow_dispatch.
if: github.event_name != 'workflow_dispatch' || inputs.android
needs: allure_launch_android
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
batch: [0, 1]
env:
ANDROID_API_LEVEL: "34"
LAUNCH_ID: ${{ needs.allure_launch_android.outputs.launch_id }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-java
- uses: ./.github/actions/cache-gradle
- uses: ./.github/actions/setup-ruby
- uses: ./.github/actions/setup-flutter
- uses: ./.github/actions/enable-kvm
- name: Use Firebase stubs
run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
- name: Bootstrap
run: |
flutter pub global activate melos
melos bootstrap
- name: Run e2e (Android emulator)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_LEVEL }}
arch: x86_64
profile: pixel_6
script: cd sample_app/android && bundle exec fastlane run_e2e_test device:emulator-5554 batch:${{ matrix.batch }} batch_count:${{ strategy.job-total }}
- name: Attach videos to failed tests
if: failure()
working-directory: sample_app/android
run: |
sudo apt-get update && sudo apt-get install -y ffmpeg
bundle exec fastlane attach_videos
- name: Upload Allure results
if: env.LAUNCH_ID != '' && (success() || failure())
working-directory: sample_app/android
run: bundle exec fastlane allure_upload launch_id:$LAUNCH_ID
- name: Allure TestOps Launch Removal
if: env.LAUNCH_ID != '' && cancelled()
working-directory: sample_app/android
run: bundle exec fastlane allure_launch_removal launch_id:$LAUNCH_ID
- uses: actions/upload-artifact@v7
if: failure()
with:
name: e2e-android-logs-${{ matrix.batch }}
path: |
sample_app/stream-chat-test-mock-server/logs
sample_app/build/e2e-test.log
ios:
# Only on workflow_dispatch, when the checkbox is ticked.
if: github.event_name == 'workflow_dispatch' && inputs.ios
needs: allure_launch_ios
runs-on: macos-15
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
batch: [0, 1]
env:
IOS_SIMULATOR_VERSION: "26.2"
IOS_SIMULATOR_DEVICE: "iPhone 17"
LAUNCH_ID: ${{ needs.allure_launch_ios.outputs.launch_id }}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-flutter
- uses: ./.github/actions/setup-ruby
- name: Use Firebase stubs
run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
- name: Bootstrap
run: |
flutter precache --ios
flutter config --no-enable-swift-package-manager
flutter pub global activate melos
melos bootstrap
# After Bootstrap so the cache keys hash the resolved pubspec.lock
- uses: ./.github/actions/cache-cocoapods
with:
key-suffix: ${{ runner.os }}
- name: Run e2e (iOS simulator)
working-directory: sample_app/ios
run: bundle exec fastlane run_e2e_test platform:ios ios:"${{ env.IOS_SIMULATOR_VERSION }}" device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:${{ matrix.batch }} batch_count:${{ strategy.job-total }}
- name: Upload Allure results
if: env.LAUNCH_ID != '' && (success() || failure())
working-directory: sample_app/ios
run: bundle exec fastlane allure_upload launch_id:$LAUNCH_ID
- name: Allure TestOps Launch Removal
if: env.LAUNCH_ID != '' && cancelled()
working-directory: sample_app/ios
run: bundle exec fastlane allure_launch_removal launch_id:$LAUNCH_ID
- uses: actions/upload-artifact@v7
if: failure()
with:
name: e2e-ios-logs-${{ matrix.batch }}
path: |
sample_app/stream-chat-test-mock-server/logs
sample_app/build/e2e-test.log