Skip to content

Fix flaky iOS integration test #1361

Fix flaky iOS integration test

Fix flaky iOS integration test #1361

name: flutter integration tests
on:
push:
branches:
- main
- release/**
pull_request:
paths-ignore:
- 'file/**'
jobs:
cancel-previous-workflow:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0
with:
access_token: ${{ github.token }}
# test-android:
# runs-on: macos-latest
# timeout-minutes: 30
# defaults:
# run:
# working-directory: ./flutter/example
# strategy:
# fail-fast: false
# matrix:
# sdk: ['stable', 'beta']
# steps:
# - name: checkout
# uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# distribution: 'adopt'
# java-version: '11'
# - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
# with:
# channel: ${{ matrix.sdk }}
# - name: flutter upgrade
# run: flutter upgrade
# - name: flutter pub get
# run: flutter pub get
# - name: launch android emulator & run android integration test
# uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 #pin@v2.27.0
# with:
# working-directory: ./flutter/example
# api-level: 21
# arch: x86_64
# profile: Nexus 6
# script: flutter test integration_test/integration_test.dart --verbose
# Enable after fixing https://github.com/getsentry/sentry-dart/issues/1448
test-ios:
runs-on: macos-13
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter/example
strategy:
fail-fast: false
matrix:
# 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
sdk: ['stable']
steps:
- name: checkout
uses: actions/checkout@v3
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}
- name: flutter upgrade
run: flutter upgrade
- name: flutter pub get
run: flutter pub get
- name: launch ios simulator
run: |
simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-4)
xcrun simctl boot ${simulator_id}
- name: run ios integration test
run: flutter test integration_test/integration_test.dart --verbose