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
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# references:
# * http://www.objc.io/issue-6/travis-ci.html
# * https://github.com/supermarin/xcpretty#usage

osx_image: xcode7.3
language: objective-c
# cache: cocoapods
# podfile: Example/Podfile
# before_install:
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -workspace Example/StringScore_Swift.xcworkspace -scheme StringScore_Swift-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
script: ci
38 changes: 38 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
XCODEBUILD_OPTS = "-project StringScore.xcodeproj -derivedDataPath DerivedData"
IOS = "-scheme StringScore_Swift -sdk iphonesimulator9.3 -destination 'platform=iOS Simulator,name=iPhone 6'"
MACOSX = "-scheme StringScore_Swift -destination 'generic/platform=OS X'"

def xcpretty(cmd)
sh "set -o pipefail; #{cmd} | xcpretty -c"
end

task default: %w[test]

task ci: %w[test:ios]

desc "Run all tests"
task test: %w[test:ios test:macosx]

namespace :test do
desc "Test on iOS"
task :ios do
xcpretty "xcodebuild test #{XCODEBUILD_OPTS} #{IOS}"
end

desc "Test on Mac OS X"
task :macosx do
xcpretty "xcodebuild test #{XCODEBUILD_OPTS} #{MACOSX}"
end
end

namespace :podspec do
desc "Validate the podspec"
task :lint do
sh "pod lib lint"
end
end

desc "Clean the default scheme"
task :clean do
rm_rf "DerivedData"
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2C40F6631CD48FA100E4A595"
BuildableName = "StringScoreTests.xctest"
BlueprintName = "StringScoreTests"
ReferencedContainer = "container:StringScore.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>