Skip to content

Commit

Permalink
scripts were changed
Browse files Browse the repository at this point in the history
  • Loading branch information
yoalex5 committed Sep 11, 2019
1 parent 71cb023 commit 75a468f
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 12 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ disabled_rules: # rule identifiers to exclude from running
- identifier_name
- control_statement
- nesting
- file_length

line_length: 250
function_body_length: 100
Expand Down
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: swift
osx_image: xcode10.2
before_script: "./scripts/add-keys.sh"
before_install:
- "pod repo update"
- "gem install cocoapods"
before_script:
- "./scripts/add-keys.sh"
after_script: "./scripts/remove-key.sh"
script:
- "./scripts/swiftLint.sh"
- "./scripts/buildPrebidSDK.sh"
- "./scripts/testPrebidSDK.sh"
- "./scripts/buildPrebidMobile.sh"
- "./scripts/testPrebidMobile.sh"
- "./scripts/testPrebidDemo.sh"
1 change: 0 additions & 1 deletion PrebidMobile.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Pod::Spec.new do |s|
s.platform = :ios, "9.0"
s.swift_version = '5.0'
s.source = { :git => "https://github.com/prebid/prebid-mobile-ios.git", :tag => "#{s.version}" }
s.source_files = "src/PrebidMobile/PrebidMobile","src/PrebidMobile/PrebidMobile/*.{h,swift}","src/PrebidMobile/PrebidMobile/**/*.swift"
s.xcconfig = {
:LIBRARY_SEARCH_PATHS => '$(inherited)',
:OTHER_CFLAGS => '$(inherited)',
Expand Down
19 changes: 19 additions & 0 deletions PrebidMobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@
FAC837D82321583500565051 /* CollectionExtensionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC837D72321583500565051 /* CollectionExtensionTest.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
FAC9E22823284B2800113B04 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 60D792E9217E229A0080F428 /* Project object */;
proxyType = 1;
remoteGlobalIDString = FAAA00BC2322733E009DC7D6;
remoteInfo = PrebidMobile;
};
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
1F1C6E8B15DF27C3772977CE /* Pods-PrebidMobileCore.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrebidMobileCore.release.xcconfig"; path = "Target Support Files/Pods-PrebidMobileCore/Pods-PrebidMobileCore.release.xcconfig"; sourceTree = "<group>"; };
35FE3E0475D07E6FE2455850 /* Pods-PrebidMobile.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PrebidMobile.debug.xcconfig"; path = "Target Support Files/Pods-PrebidMobile/Pods-PrebidMobile.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -446,6 +456,7 @@
buildRules = (
);
dependencies = (
FAC9E22923284B2800113B04 /* PBXTargetDependency */,
);
name = PrebidMobileTests;
productName = PrebidMobileTests;
Expand Down Expand Up @@ -703,6 +714,14 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
FAC9E22923284B2800113B04 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = FAAA00BC2322733E009DC7D6 /* PrebidMobile */;
targetProxy = FAC9E22823284B2800113B04 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin XCBuildConfiguration section */
60D79304217E229B0080F428 /* Debug */ = {
isa = XCBuildConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES"
testExecutionOrdering = "random">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "60D792FA217E229B0080F428"
Expand Down
3 changes: 2 additions & 1 deletion scripts/buildPrebidSDK.sh → scripts/buildPrebidMobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ fi
# 1
# Set bash script to exit immediately if any commands fail.
set -e

cd ../

# Setup some constants for use later on.
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color

echo -e "\n\n${GREEN}BUILD PREBID MOBILE${NC}\n\n"

PRODUCT_NAME="PrebidMobile"

GENERATED_DIR_NAME="generated"
Expand Down
8 changes: 6 additions & 2 deletions scripts/testPrebidDemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ if [ -d "scripts" ]; then
cd scripts/
fi

GREEN='\033[0;32m'
NC='\033[0m' # No Color

echo -e "\n\n${GREEN}TEST PREBID DEMO${NC}\n\n"

cd ..
echo $PWD

gem install cocoapods --user-install
pod install --repo-update

echo "Running integration tests"
xcodebuild test -workspace PrebidMobile.xcworkspace -scheme "PrebidDemoSwiftTests" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=12.2' | xcpretty -f `xcpretty-travis-formatter` --color --test
echo -e "\n${GREEN}Running integration tests${NC} \n"
xcodebuild test -workspace PrebidMobile.xcworkspace -scheme "PrebidDemoTests" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=12.2' | xcpretty -f `xcpretty-travis-formatter` --color --test

# Make the keychain the default so identities are found
security default-keychain -s ios-build.keychain
Expand Down
9 changes: 7 additions & 2 deletions scripts/testPrebidSDK.sh → scripts/testPrebidMobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ fi

set -e

GREEN='\033[0;32m'
NC='\033[0m' # No Color

echo -e "\n\n${GREEN}TEST PREBID MOBILE${NC}\n\n"

cd ..
echo $PWD

Expand All @@ -13,7 +18,7 @@ gem install xcpretty-travis-formatter --user-install
gem install cocoapods --user-install
pod install --repo-update

echo "Running unit tests"
echo -e "\n${GREEN}Running unit tests${NC} \n"
xcodebuild test -workspace PrebidMobile.xcworkspace -scheme "PrebidMobileTests" -destination 'platform=iOS Simulator,name=iPhone 8 Plus,OS=12.2' | xcpretty -f `xcpretty-travis-formatter` --color --test

if [[ ${PIPESTATUS[0]} == 0 ]]; then
Expand All @@ -23,5 +28,5 @@ else
exit 1
fi

echo "Running swiftlint tests"
echo -e "\n${GREEN}Running swiftlint tests${NC} \n"
swiftlint --config .swiftlint.yml

0 comments on commit 75a468f

Please sign in to comment.