Fix: Codecov range

Fix: Travis cache
This commit is contained in:
Flávio Caetano 2017-11-13 14:13:01 -02:00
parent d0e74a8d02
commit f5a4632eb5
5 changed files with 10 additions and 112 deletions

View File

@ -1,6 +1,11 @@
osx_image: xcode9
language: objective-c
cache:
cocoapods: true
directories:
- Carthage
script:
- bundle exec fastlane ci

View File

@ -214,7 +214,6 @@
607FACCE1AFB9204008FA782 /* Resources */,
8F03FFB3F5C55E873C23C682 /* [CP] Embed Pods Frameworks */,
ED1C0E07490C9C4B4A401061 /* [CP] Copy Pods Resources */,
F2C0FD7E1F9F8061009B7A6F /* SwiftLint */,
);
buildRules = (
);
@ -419,20 +418,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReCaptcha_Example/Pods-ReCaptcha_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
F2C0FD7E1F9F8061009B7A6F /* SwiftLint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = SwiftLint;
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if [ -f \"${PODS_ROOT}/SwiftLint/swiftlint\" ]; then\n \"${PODS_ROOT}/SwiftLint/swiftlint\" --path \"${PROJECT_DIR}/..\"\nelse\n echo \"error: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\n exit 1\nfi";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */

View File

@ -4,7 +4,7 @@ codecov:
coverage:
precision: 2
round: down
range: "90...100"
range: "75...95"
status:
project:

View File

@ -10,12 +10,10 @@ default_platform :ios
platform :ios do
skip_docs
devices = [
"iPhone X (11.0)",
"iPhone 7 (10.0)",
"iPhone 6 (9.0)",
"iPhone 5s (8.1)",
]
devices = ["iPhone X (11.0)"]
devices << "iPhone 7 (10.0)" if !Helper.is_ci?
devices << "iPhone 6 (9.0)" if !Helper.is_ci?
devices << "iPhone 5s (8.1)" if !Helper.is_ci?
desc "Runs the following lanes:\n- test\n- pod_lint\n- carthage_lint"
lane :ci do
@ -26,11 +24,6 @@ platform :ios do
desc "Runs all the tests"
lane :test do
ios_simulator(
devices: devices,
reset_before_launching: is_ci,
)
cocoapods(
podfile: "Example/Podfile",
)
@ -52,8 +45,6 @@ platform :ios do
scheme: "ReCaptcha-Example",
workspace: "Example/ReCaptcha.xcworkspace",
code_coverage: true,
buildlog_path: File.join(ENV['BITRISE_DEPLOY_DIR'] || '.', "logs/build"),
xcargs: '-maximum-concurrent-test-device-destinations=1',
)
scan(
@ -62,12 +53,9 @@ platform :ios do
scheme: "ReCaptcha-Example",
workspace: "Example/ReCaptcha.xcworkspace",
code_coverage: true,
buildlog_path: File.join(ENV['BITRISE_DEPLOY_DIR'] || '.', "logs/run"),
xcargs: '-maximum-concurrent-test-device-destinations=1',
)
if is_ci
puts "Uploading coverage files to CodeCov"
codecov(
project_name: 'ReCaptcha',
use_xcodeplist: true,
@ -100,8 +88,6 @@ platform :ios do
desc "Deploy a new version to Github and Cocoapods"
lane :release do
ci unless is_ci
carthage(
command: "archive",
)

View File

@ -1,78 +0,0 @@
module Fastlane
module Actions
module SharedValues
IOS_SIMULATOR_CUSTOM_VALUE = :IOS_SIMULATOR_CUSTOM_VALUE
end
class IosSimulatorAction < Action
@@already_booted_code = 164
def self.run(params)
devices = params[:devices] || Array(params[:device])
available_sims = FastlaneCore::Simulator.all
devices.each do |device|
sim = available_sims.detect { |d| device == "#{d.name} (#{d.os_version})" }
if sim.nil?
UI.error "Device not found: #{device}"
next
end
if params[:reset_before_launching]
sim.reset
end
`xcrun simctl boot #{sim.udid} > /dev/null 2>&1`
if $?.exitstatus == @@already_booted_code
UI.important "Skipping #{device} (already booted)"
end
UI.message "Booted #{device} [#{sim.udid}]" unless $?.exitstatus == @@already_booted_code
end
end
#####################################################
# @!group Documentation
#####################################################
def self.description
"Launch iOS simulators beforehand to allow for boot time"
end
def self.details
"Run `xcrun instruments -s` for the list of available simulators"
end
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :device,
env_name: "SCAN_DEVICE",
description: "The name of the simulator type you want to run tests on (e.g. 'iPhone 6 (10.0)')", # a short description of this parameter
conflicting_options: [:devices],
),
FastlaneCore::ConfigItem.new(key: :devices,
env_name: "SCAN_DEVICES",
description: "Array of devices to run the tests on (e.g. ['iPhone 6 (10.0)', 'iPad Air (8.3)'])",
is_string: false,
conflicting_options: [:device],
optional: true,
),
FastlaneCore::ConfigItem.new(key: :reset_before_launching,
env_name: "FL_IOS_SIMULATOR_RESET",
description: "Should reset simulators before launching",
is_string: false,
default_value: false,
),
]
end
def self.author
"Flávio Caetano (@fjcaetano)"
end
def self.is_supported?(platform)
platform == :ios
end
end
end
end