Skip to content

Commit

Permalink
- Fix: Podfile fork path
Browse files Browse the repository at this point in the history
- Fix: pod repo update before linting

- Fastlane action for Codecov upload
  • Loading branch information
fjcaetano committed Nov 1, 2017
1 parent e7c96e4 commit 073132b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "fastlane/actions"]
path = fastlane/actions
url = https://gist.github.com/04126b3051f6cd6aebe041bb1dfe14e9.git
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ target 'ReCaptcha_Example' do
target 'ReCaptcha_Tests' do
inherit! :search_paths

pod 'AppSwizzle', :git => 'git@github.com:fjcaetano/AppSwizzle.git', :branch => 'swift4'
pod 'AppSwizzle', :git => 'https://github.com/fjcaetano/AppSwizzle.git', :branch => 'swift4'
end
end

Expand Down
8 changes: 4 additions & 4 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ PODS:
- SwiftLint (0.23.1)

DEPENDENCIES:
- AppSwizzle (from `git@github.com:fjcaetano/AppSwizzle.git`, branch `swift4`)
- AppSwizzle (from `https://github.com/fjcaetano/AppSwizzle.git`, branch `swift4`)
- ReCaptcha/RxSwift (from `../`)
- RxCocoa (~> 4.0)
- SwiftLint (~> 0.23)

EXTERNAL SOURCES:
AppSwizzle:
:branch: swift4
:git: git@github.com:fjcaetano/AppSwizzle.git
:git: https://github.com/fjcaetano/AppSwizzle.git
ReCaptcha:
:path: ../

CHECKOUT OPTIONS:
AppSwizzle:
:commit: c432a73e43779d20ef8e8a589aabd9622b7b6a5d
:git: git@github.com:fjcaetano/AppSwizzle.git
:git: https://github.com/fjcaetano/AppSwizzle.git

SPEC CHECKSUMS:
AppSwizzle: bbd3782652fc426ce59c045a92ec61d36f261984
Expand All @@ -37,6 +37,6 @@ SPEC CHECKSUMS:
RxSwift: fd680d75283beb5e2559486f3c0ff852f0d35334
SwiftLint: 1b670ce79284c76520f84060e87d645078fd32fa

PODFILE CHECKSUM: b22c55655f09e6f7d188835d6914c58236e5956e
PODFILE CHECKSUM: de2b642fc95f65632e92b6b5beba95353f716393

COCOAPODS: 1.3.1
29 changes: 27 additions & 2 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ default_platform :ios
platform :ios do
skip_docs

lane :cov do
end

desc "Runs all the tests"
lane :test do
cocoapods(
Expand All @@ -29,24 +32,46 @@ platform :ios do
strict: true
)

# The problem lies in the fact (or rather: serious bug in xcodebuild) that
# the timeout for connecting to the XCTest server starts at the moment you
# issue the command xcodebuild. The timeout is 120 seconds, so if your
# compilation + startup of the simulator takes longer than 2 minutes
# xcodebuild will give this "Canceling tests due to timeout" error.
# https://stackoverflow.com/questions/37922146/xctests-failing-on-physical-device-canceling-tests-due-to-timeout/40790171#40790171
scan(
workspace: "Example/ReCaptcha.xcworkspace",
scheme: "ReCaptcha-Example",
device: ENV["DEVICE"],
code_coverage: true,
build_for_testing: true
)

scan(
workspace: "Example/ReCaptcha.xcworkspace",
scheme: "ReCaptcha-Example",
device: ENV["DEVICE"],
# device: "iPhone X (11.0)",
code_coverage: true,
test_without_building: true
)

if is_ci
puts "Uploading coverage files to CodeCov"
sh "curl -s https://codecov.io/bash | bash -s -- -J 'ReCaptcha'"
codecov(
project_name: 'ReCaptcha',
use_xcodeplist: true,
)
else
puts "Not CI: Skipping coverage files upload"
end
end

desc "Lint Cocoapods Lib"
lane :pod_lint do
cocoapods(
podfile: "Example/Podfile",
repo_update: true
)

pod_lib_lint(
allow_warnings: true # Remove this when RxSwift stops warning
)
Expand Down
1 change: 1 addition & 0 deletions fastlane/actions
Submodule actions added at 75911f

0 comments on commit 073132b

Please sign in to comment.