Skip to content

Commit

Permalink
Merge pull request Moya#1602 from Moya/circle-ci-2.0-upgrade
Browse files Browse the repository at this point in the history
Migrates to Circle CI 2.0
  • Loading branch information
freak4pc authored Mar 5, 2018
2 parents 4b3ff7e + 85c75a6 commit 5bdb72b
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 73 deletions.
77 changes: 77 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: 2
jobs:
build:
working_directory: ~/Moya/Moya
parallelism: 1
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
LANG: en_US.UTF-8
BUNDLE_PATH: vendor/bundle
macos:
xcode: '9.2.0'
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
- v1-dep-{{ .Branch }}-
- v1-dep-master-
- v1-dep-
- run:
name: Set Ruby Version
command: echo "ruby-2.4" > ~/.ruby-version
- run:
name: Fetch CocoaPods Specs
command: curl -sS https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash
- run:
name: Update Homebrew
command: brew update
- run:
name: Install Swiftlint
command: brew install swiftlint
- run:
name: Install Ruby Dependencies
command: bundle check || bundle install
environment:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
- run:
name: Bootstrap Carthage
command: scripts/bootstrap-if-needed.sh
- save_cache:
key: v1-dep-{{ .Branch }}-{{ epoch }}
paths:
- vendor/bundle
- Carthage
- run:
name: Test on iOS
command: rake test:ios
- run:
name: Test on macOS
command: rake test:macos
- run:
name: Test on tvOS
command: rake test:tvos
- run:
name: Test with Carthage
command: rake test:carthage
- run:
name: Build Example Project
command: rake build_example
- run:
name: Run Danger
command: bundle exec danger
- run:
name: Send Code Coverage to Codecov.io
command: bash <(curl -s https://codecov.io/bash) -J Moya
- run:
name: Store Xcode Activity Log
command: find $HOME/Library/Developer/Xcode/DerivedData -name '*.xcactivitylog' -exec cp {} $CIRCLE_ARTIFACTS/xcactivitylog \; || true
- store_test_results:
path: /tmp/circleci-test-results
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
86 changes: 46 additions & 40 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
activesupport (4.2.8)
CFPropertyList (2.3.6)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
claide (1.0.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
atomos (0.1.2)
claide (1.0.2)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
cocoapods (1.2.1)
cocoapods (1.4.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.1, < 2.0)
cocoapods-core (= 1.2.1)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.4.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.2.0, < 2.0)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.7)
molinillo (~> 0.6.4)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.4.4, < 2.0)
cocoapods-core (1.2.1)
activesupport (>= 4.0.2, < 5)
xcodeproj (>= 1.5.4, < 2.0)
cocoapods-core (1.4.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.2.0)
cocoapods-trunk (1.3.0)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.0.5)
cork (0.3.0)
colored2 (~> 3.1)
danger (5.2.1)
danger (5.5.10)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
Expand All @@ -59,52 +61,56 @@ GEM
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
octokit (~> 4.2)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-swiftlint (0.5.0)
danger-swiftlint (0.13.1)
danger
rake (~> 10.0)
rake (> 10)
thor (~> 0.19)
escape (0.0.4)
faraday (0.12.1)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
gh_inspector (1.1.2)
git (1.3.0)
i18n (0.8.1)
kramdown (1.13.2)
minitest (5.10.1)
molinillo (0.5.7)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
kramdown (1.16.2)
minitest (5.11.3)
molinillo (0.6.4)
multipart-post (2.0.0)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.7.8)
octokit (4.7.0)
netrc (0.11.0)
no_proxy_fix (0.1.2)
octokit (4.8.0)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
public_suffix (2.0.5)
rake (10.5.0)
public_suffix (3.0.2)
rake (12.3.0)
rouge (2.0.7)
ruby-macho (1.1.0)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
terminal-table (1.7.3)
unicode-display_width (~> 1.1.1)
thor (0.19.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.3)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.1.3)
xcodeproj (1.4.4)
unicode-display_width (1.3.0)
xcodeproj (1.5.6)
CFPropertyList (~> 2.3.3)
claide (>= 1.0.1, < 2.0)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
xcpretty (0.2.7)
xcpretty (0.2.8)
rouge (~> 2.0.7)

PLATFORMS
Expand All @@ -119,4 +125,4 @@ DEPENDENCIES
xcpretty

BUNDLED WITH
1.14.6
1.16.0
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ end

def device_os
return {
ios: "11.0.1",
tvos: "11.0"
ios: "11.2",
tvos: "11.2"
}
end

Expand Down
17 changes: 10 additions & 7 deletions Tests/MoyaProviderIntegrationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,16 @@ final class MoyaProviderIntegrationTests: QuickSpec {
provider.request(.zen) { _ in done() }
}

expect(log).to( contain("Request:") )
expect(log).to( contain("{ URL: https://api.github.com/zen }") )
expect(log).to( contain("Request Headers: [:]") )
expect(log).to( contain("HTTP Request Method: GET") )
expect(log).to( contain("Response:") )
expect(log).to( contain("{ URL: https://api.github.com/zen } { status code: 200, headers") )
expect(log).to( contain("\"Content-Length\" = 43;") )
expect(log).to(contain("Request:"))
expect(log).to(contain("{ URL: https://api.github.com/zen }"))
expect(log).to(contain("Request Headers: [:]"))
expect(log).to(contain("HTTP Request Method: GET"))
expect(log).to(contain("Response:"))
expect(log).to(contain("{ URL: https://api.github.com/zen }"))
// Had to split these two below because of whitespaces/newlines
// Also these have the log lowercased because of the inconsistency on the backend side
expect(log.lowercased()).to(contain("{ status code: 200, headers"))
expect(log.lowercased()).to(contain("\"content-length\""))
}
}
}
Expand Down
24 changes: 0 additions & 24 deletions circle.yml

This file was deleted.

0 comments on commit 5bdb72b

Please sign in to comment.