Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix integration test on iOS beta channel due to Flutter bug #1399

Merged
merged 11 commits into from
Apr 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d # pin@v1
if: ${{ inputs.sdk == 'dart' }}
- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
if: ${{ inputs.sdk == 'flutter' }}
- run: ${{ inputs.sdk }} pub get
- run: ${{ inputs.sdk }} format --set-exit-if-changed ./
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e_dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
build:
name: E2E
runs-on: 'ubuntu-latest'
timeout-minutes: 30
defaults:
run:
working-directory: ./e2e_test
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
sudo apt install -y network-manager upower
if: matrix.os == 'ubuntu-latest'

- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}

Expand Down Expand Up @@ -151,6 +151,7 @@ jobs:

pod-lint:
runs-on: macos-latest
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
Expand All @@ -161,6 +162,7 @@ jobs:

swift-lint:
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
Expand All @@ -172,6 +174,7 @@ jobs:

ktlint:
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
working-directory: ./flutter
Expand All @@ -188,6 +191,7 @@ jobs:

detekt:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
# To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/flutter_integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ jobs:

test-android:
runs-on: macos-latest
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter/example
strategy:
fail-fast: false
matrix:
sdk: ['stable', 'beta']
steps:
Expand All @@ -34,7 +36,7 @@ jobs:
distribution: 'adopt'
java-version: '11'

- uses: subosito/flutter-action@1e6ee87cb840500837bcd50a667fb28815d8e310 # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}

Expand All @@ -51,20 +53,23 @@ jobs:
api-level: 21
arch: x86_64
profile: Nexus 6
script: flutter test integration_test/integration_test.dart
script: flutter test integration_test/integration_test.dart --verbose
test-ios:
runs-on: macos-11
runs-on: macos-12
timeout-minutes: 30
defaults:
run:
working-directory: ./flutter/example
strategy:
fail-fast: false
matrix:
sdk: ['stable', 'beta']
# '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@1e6ee87cb840500837bcd50a667fb28815d8e310 # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}

Expand All @@ -77,8 +82,8 @@ jobs:
- name: launch ios emulator
uses: futureware-tech/simulator-action@ee05c113b79f056b47f354d7b313555f5491e158 #pin@v2
with:
model: 'iPhone 8'
os_version: '15.2'
model: 'iPhone 14'
os_version: '16.2'

- name: run ios integration test
run: flutter test integration_test/integration_test.dart
run: flutter test integration_test/integration_test.dart --verbose
3 changes: 2 additions & 1 deletion .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
metrics:
name: ${{ matrix.name }}
runs-on: ${{ matrix.host }}
timeout-minutes: 30
strategy:
# We want that the matrix keeps running, default is to cancel all jobs if a single fails.
fail-fast: false
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
echo "flutter=$version" >> "$GITHUB_OUTPUT"

- name: Install Flutter v${{ steps.conf.outputs.flutter }}
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
flutter-version: ${{ steps.conf.outputs.flutter }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/min_version_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
distribution: 'adopt'
java-version: '11'

- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
flutter-version: '3.0.0'
# Add flutter build web (missing index)
Expand All @@ -47,7 +47,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
flutter-version: '3.0.0'
# Add flutter build web (missing index)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqflite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
sudo apt install -y network-manager upower
if: matrix.os == 'ubuntu-latest'

- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
with:
channel: ${{ matrix.sdk }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/web-example-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # pin@v2
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # pin@v2.10.0
- uses: bluefireteam/flutter-gh-pages@57815b17b371455ec1a98f075b71b4c6ba0a938c # pin@v8
with:
workingDir: flutter/example
Expand Down
2 changes: 1 addition & 1 deletion flutter/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
13 changes: 12 additions & 1 deletion flutter/example/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
wanted_project_target = '11.0'

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, wanted_project_target

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -35,6 +37,15 @@ target 'Runner' do
end

post_install do |installer|
# remove after https://github.com/flutter/flutter/issues/124340 getting into all channels
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = wanted_project_target
end
end
end

installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
Expand Down
2 changes: 2 additions & 0 deletions flutter/example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
Expand Down Expand Up @@ -231,6 +232,7 @@
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down