Skip to content
Open
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
35 changes: 28 additions & 7 deletions .github/workflows/flutter_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: futureware-tech/simulator-action@v3
with:
model: ${{ matrix.device }}

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.29'
Expand All @@ -24,11 +20,36 @@ jobs:
# tests it's best to perform dependency update in both packages, to make sure that
# integration tests are run with exactly the same dependencies as specified in
# current version of ably_flutter package
- name: 'Run Flutter Driver tests'
timeout-minutes: 30
- name: Update dependencies
run: |
flutter pub get
cd test_integration && flutter drive
cd test_integration && flutter pub get

- name: Build iOS app (no simulator needed yet)
working-directory: test_integration
run: flutter build ios --simulator

- name: Pick simulator
run: |
DEVICE=$(xcrun simctl list devices available | \
grep -E "iPhone" | head -n 1)
echo $DEVICE
UDID=$(echo $DEVICE | sed -E 's/.*\(([A-F0-9-]+)\).*/\1/')
echo "SIMULATOR_ID=$UDID" >> $GITHUB_ENV

- name: Boot simulator
timeout-minutes: 5
run: |
xcrun simctl boot "$SIMULATOR_ID" || true
xcrun simctl bootstatus "$SIMULATOR_ID" -b

- name: Run integration tests (no rebuild)
timeout-minutes: 25
working-directory: test_integration
run: |
flutter drive --no-pub --no-build \
--use-application-binary=build/ios/iphonesimulator/Runner.app \
-d $SIMULATOR_ID

android:
runs-on: ubuntu-latest
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/ios_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: futureware-tech/simulator-action@v5
id: ios-simulator

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.29'
Expand All @@ -30,11 +27,19 @@ jobs:
--validation-dir=/tmp/ably_test_build \
--no-clean

- name: Pick simulator
run: |
UDID=$(xcrun simctl list devices available | \
grep -E "iPhone" | head -n 1 | \
sed -E 's/.*\(([A-F0-9-]+)\).*/\1/')
echo "SIMULATOR_ID=$UDID" >> $GITHUB_ENV


- name: Run iOS unit tests
timeout-minutes: 30
run: |
xcodebuild test \
-workspace /tmp/ably_test_build/App.xcworkspace \
-scheme ably_flutter-Unit-Tests \
-destination 'id=${{ steps.ios-simulator.outputs.udid }}' \
-destination "id=$SIMULATOR_ID,arch=arm64" \
CODE_SIGNING_ALLOWED=NO
2 changes: 1 addition & 1 deletion test_integration/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>12.0</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions test_integration/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
use_frameworks!
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down Expand Up @@ -29,7 +28,8 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup

target 'Runner' do

use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
Expand Down
2 changes: 1 addition & 1 deletion test_integration/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
msgpack: c85f6251873059738472ae136951cec5f30f3251

PODFILE CHECKSUM: f2c6cc511583caab2c65ac3f5766428391d93d34
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.16.2
7 changes: 5 additions & 2 deletions test_integration/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -199,10 +199,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -213,6 +215,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -50,6 +50,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion test_integration/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
4 changes: 4 additions & 0 deletions test_integration/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
Loading