Skip to content

Commit

Permalink
Integrated shared CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AvdLee committed Mar 23, 2018
1 parent 98de09d commit 75667a2
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 246 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Submodules/WeTransfer-iOS-CI"]
path = Submodules/WeTransfer-iOS-CI
url = https://github.com/WeTransfer/WeTransfer-iOS-CI.git
20 changes: 0 additions & 20 deletions .swiftlint.yml

This file was deleted.

15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
language: objective-c
osx_image: xcode9.2
gemfile: Gemfile
bundler_args: "--without documentation --path bundle" # Don't download documentation for gems.
cache:
bundler: true
directories:
- /tmp/SwiftLint # Cache SwiftLint (absolute url on purpose)
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # Prevents long install time http://awesomism.co.uk/nokogiri-slow-install/

script:
- bundle exec fastlane test
before_install:
- brew outdated swiftlint || brew upgrade swiftlint
- bundle install
- "./Submodules/WeTransfer-iOS-CI/Scripts/travis.sh Mocker" # Run WeTransfer iOS CI Travis script
34 changes: 0 additions & 34 deletions Dangerfile

This file was deleted.

8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# frozen_string_literal: true
source "https://rubygems.org"

gem 'fastlane'
# Needed for Fastlane & Danger
gem 'fastlane', '~>2.86.2'
gem 'danger'
gem 'danger-swiftlint', '0.12.1'
gem 'danger-swiftlint', '~>0.13.1'
gem 'danger-xcov'
gem 'danger-xcodebuild'
gem 'danger-xcode_summary'
gem 'xcpretty'
gem 'xcpretty-json-formatter'
gem 'xcpretty-json-formatter'
2 changes: 1 addition & 1 deletion Mocker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "if which swiftlint >/dev/null; then\n swiftlint lint --config \".swiftlint.yml\"\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n\n";
shellScript = "if [ -z \"$CI\" ]; then\n if which swiftlint >/dev/null; then\n swiftlint --config \"${SRCROOT}/Submodules/WeTransfer-iOS-CI/SwiftLint/.swiftlint-source.yml\"\n swiftlint --config \"${SRCROOT}/Submodules/WeTransfer-iOS-CI/SwiftLint/.swiftlint-tests.yml\"\n else\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\n fi\nfi\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
19 changes: 0 additions & 19 deletions Mocker/MockerTests/.swiftlint.yml

This file was deleted.

1 change: 1 addition & 0 deletions Submodules/WeTransfer-iOS-CI
Submodule WeTransfer-iOS-CI added at 655347
155 changes: 0 additions & 155 deletions danger/shared/Dangerfile

This file was deleted.

21 changes: 12 additions & 9 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@
fastlane_version "1.109.0"
generated_fastfile_id "0121e253-f9e2-40ac-b489-f17f36e24ec6"

default_platform :ios
import "./../Submodules/WeTransfer-iOS-CI/Fastlane/Fastfile"

desc "Run tests and Danger"
lane :test do
clear_derived_data
desc "Clean the derived data, run tests validate the changes"
lane :test do |options|
# clear_derived_data

# Set timeout to prevent xcodebuild -list -project to take to much retries.
ENV["FASTLANE_XCODE_LIST_TIMEOUT"] = "120"

scan(
scheme: "Mocker",
project: "Mocker.xcodeproj",
skip_slack: true,
scheme: options[:project_name],
project: "#{options[:project_name]}.xcodeproj",
device: "iPhone 7",
clean: true,
code_coverage: true,
formatter: "xcpretty-json-formatter")
formatter: "xcpretty-json-formatter"
)

danger
validate_changes(project_name: options[:project_name])
end

0 comments on commit 75667a2

Please sign in to comment.