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

WIP: Run iOS 9, 10, 11 tests on Travis #681

Merged
merged 28 commits into from
Feb 5, 2018
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f2fe254
Add Scanfile
funkyboy Jan 31, 2018
079e912
Fix iOS version
funkyboy Jan 31, 2018
daccac9
Sleep after success (because you earned it :)
funkyboy Jan 31, 2018
fd81f4a
Try with just one device
funkyboy Jan 31, 2018
236701b
Test with 2 devices
funkyboy Jan 31, 2018
0f00dd9
Clean simulators before running
funkyboy Jan 31, 2018
2892104
Ensure specific version of fastlane
funkyboy Feb 1, 2018
baa2658
Devices as args to the script
funkyboy Feb 1, 2018
bf06dd4
Split tests by device
funkyboy Feb 1, 2018
0f20fc6
Fix iOS10 sim version
funkyboy Feb 1, 2018
00c77b6
Remove unneeded clean statement
funkyboy Feb 1, 2018
390d863
Add iOS8 to tests
funkyboy Feb 1, 2018
65f2c0c
Use Fastfile in Travis configuration
funkyboy Feb 1, 2018
c8daef7
Default payloads for Slack messages
funkyboy Feb 1, 2018
8cf9ad0
Clear sims in between test groups
funkyboy Feb 1, 2018
e12f2d8
Update fastlane version
funkyboy Feb 2, 2018
dda4a6e
Exclude some fastlane files from git
funkyboy Feb 2, 2018
a148965
Split build and tests phases
funkyboy Feb 2, 2018
d18d372
Sprinkling sim erase calls
funkyboy Feb 2, 2018
5cfcde7
Remove slack message for build
funkyboy Feb 2, 2018
fe44d2e
Try iPhone 6 on iOS9.3
funkyboy Feb 2, 2018
b997022
Add iOS8 tests
funkyboy Feb 2, 2018
8eeeddc
Try with sleep
funkyboy Feb 2, 2018
df7ac64
Add iOS8
funkyboy Feb 2, 2018
c569399
Just to trigger
funkyboy Feb 5, 2018
ebadb5f
Retry with longer sleep time
funkyboy Feb 5, 2018
10b0dc0
Use latest version of Cocoapods
funkyboy Feb 5, 2018
0c792af
Temporarily remove iOS8 tests
funkyboy Feb 5, 2018
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -53,3 +53,8 @@ xcodebuild.log

# Scan
test_output/

# Fastlane
Fastlane/report.xml
Fastlane/test_output
Fastlane/README.md
19 changes: 13 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -5,17 +5,24 @@ env:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
before_install:
- gem install cocoapods -v '1.4.0'
install:
- brew update
- brew upgrade carthage
# CocoaPods
- pod install
# Carthage
- carthage bootstrap
# Update fastlane
- gem install fastlane -v '2.80.0'
script:
# Run tests
# Use `travis_wait` when a long running command or compile step regularly takes longer than 10 minutes without producing any output.
# It writes a short line to the build log every minute for 20 minutes, extending the amount of time your command has to finish.
# Prefix `travis_wait` with a greater number to extend the wait time.
- fastlane scan --scheme "Ably" --open_report false --devices "iPhone 6s" --clean
- bash ./Scripts/run_examples_tests.sh
- xcrun simctl erase all
- fastlane ios build
- fastlane test_iOS11
- sleep 5
- fastlane test_iOS10
- sleep 5
- fastlane test_iOS9

after_success:
- sleep 5
3 changes: 3 additions & 0 deletions Scanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
scheme "Ably"

open_report false
51 changes: 51 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
default_platform(:ios)

platform :ios do

lane :build do
scan(build_for_testing: true,
clean: true,
skip_slack: true)
end

lane :test_iOS11 do
run_tests(devices: ["iPhone 8 (11.2)"],
test_without_building: true)
slack(
message: "Completed tests on iOS11",
success: :test_result,
default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit_message]
)
end

lane :test_iOS10 do
run_tests(devices: ["iPhone 7 (10.3.1)"],
test_without_building: true)
slack(
message: "Completed tests on iOS10",
success: :test_result,
default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit_message]
)
end

lane :test_iOS9 do
run_tests(devices: ["iPhone 6 (9.3)"],
test_without_building: true)
slack(
message: "Completed tests on iOS9",
success: :test_result,
default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit_message]
)
end

lane :test_iOS8 do
run_tests(devices: ["iPhone 6 (8.4)"],
test_without_building: true)
slack(
message: "Completed tests on iOS8",
success: :test_result,
default_payloads: [:test_result, :git_branch, :git_author, :last_git_commit_message]
)
end

end