-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
116 lines (116 loc) · 3.96 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
version: 2
defaults: &defaults
macos:
xcode: 11.0.0
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
jobs:
carthage_without_swiftlint_integration:
<<: *defaults
working_directory: ~/Moya/Moya_Carthage_1
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
- v{{ .Environment.CACHE_VERSION }}-carthage-no-swiftlint-deps-{{ checksum "Cartfile.resolved" }}
- run:
name: Set Ruby Version
command: echo "ruby-2.4" > ~/.ruby-version
- run:
name: Carthage checkout
command: carthage checkout
- run:
name: Test Carthage Build before installing SwiftLint
command: carthage build --no-skip-current --cache-builds --no-use-binaries --verbose
- save_cache:
key: v{{ .Environment.CACHE_VERSION }}-carthage-no-swiftlint-deps-{{ checksum "Cartfile.resolved" }}
paths:
- Carthage
build:
<<: *defaults
working_directory: ~/Moya/Moya
steps:
- checkout
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- restore_cache:
keys:
- v{{ .Environment.CACHE_VERSION }}-dep-{{ checksum "Cartfile.resolved" }}
- restore_cache:
keys:
- v{{ .Environment.CACHE_VERSION }}-dep-{{ checksum "Dangerfile.swift" }}
- run:
name: Set Ruby Version
command: echo "ruby-2.4" > ~/.ruby-version
- run:
name: Install Swiftlint
command: git clone [email protected]:realm/SwiftLint.git && cd SwiftLint && git submodule update --init --recursive && make install && cd ../
- run:
name: Add Python directory to PATH
command: echo 'export PATH=~/Library/Python/2.7/bin:$PATH' >> $BASH_ENV
- 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: v{{ .Environment.CACHE_VERSION }}-dep-{{ checksum "Cartfile.resolved" }}
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: Install MDSpell
command: sudo npm install -g orta/node-markdown-spellcheck
- run:
name: Run Danger
command: brew install danger/tap/danger-swift && danger-swift ci
- save_cache:
key: v{{ .Environment.CACHE_VERSION }}-dep-{{ checksum "Dangerfile.swift" }}
paths:
- ~/.danger-swift
- /usr/local/Homebrew
- run:
name: CocoaPods Spec linting
command: bundle exec pod lib lint --allow-warnings
- 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
workflows:
version: 2
pr_build:
jobs:
- build
- carthage_without_swiftlint_integration