Skip to content

Commit 2653a98

Browse files
authored
ci: change workflow with fastlane (#6)
1 parent 1b16341 commit 2653a98

File tree

6 files changed

+391
-18
lines changed

6 files changed

+391
-18
lines changed

.circleci/config.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,15 @@ version: 2.1
44

55
orbs:
66
macos: circleci/macos@2.3.3
7+
ruby: circleci/ruby@2.0.0
78

89

910
default-executor: &default-executor
1011
macos:
1112
xcode: 14.1.0
1213
working_directory: ~/circle-ci
13-
14-
15-
ios-simulator: &ios-simulator
16-
version: "16.1"
17-
platform: "iOS"
18-
device: "iPhone 14"
14+
environment:
15+
FL_OUTPUT_DIR: output
1916

2017

2118
jobs:
@@ -24,26 +21,20 @@ jobs:
2421

2522
steps:
2623
- checkout
27-
- macos/preboot-simulator:
28-
<<: *ios-simulator
24+
- ruby/install-deps
2925
- run:
30-
name: Build target on iOS
31-
command: xcodebuild build -scheme 'AmplifyUtilsNotifications' -sdk iphonesimulator -destination "id=${MACOS_ORB_DEVICE_UDID}"
32-
- run:
33-
name: Run unit tests
34-
command: xcodebuild test -scheme 'AmplifyUtilsNotifications' -sdk iphonesimulator -destination "id=${MACOS_ORB_DEVICE_UDID}"
26+
name: Fastlane test
27+
command: bundle exec fastlane ios tests
3528

3629
build-test-macos:
3730
<<: *default-executor
3831

3932
steps:
4033
- checkout
34+
- ruby/install-deps
4135
- run:
42-
name: Build target on macOS
43-
command: xcodebuild build -scheme 'AmplifyUtilsNotifications' -sdk macosx -destination "platform=macOS"
44-
- run:
45-
name: Run unit tests
46-
command: xcodebuild test -scheme 'AmplifyUtilsNotifications' -sdk macosx -destination "platform=macOS"
36+
name: Fastlane test
37+
command: bundle exec fastlane mac tests
4738

4839

4940
workflows:

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,16 @@ xcuserdata/
1313
*.ipa
1414
*.dSYM.zip
1515
*.dSYM
16+
17+
# fastlane
18+
#
19+
# It is recommended to not store the screenshots in the git repo.
20+
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
21+
# For more information about the recommended setup visit:
22+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
23+
24+
fastlane/report.xml
25+
fastlane/Preview.html
26+
fastlane/screenshots/**/*.png
27+
fastlane/test_output
28+
fastlane/test_output.xcresult

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'cocoapods', '~> 1.11.3'
4+
gem 'fastlane', '~> 2.211'

Gemfile.lock

Lines changed: 284 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,284 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.5)
5+
rexml
6+
activesupport (6.1.7)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
zeitwerk (~> 2.3)
12+
addressable (2.8.1)
13+
public_suffix (>= 2.0.2, < 6.0)
14+
algoliasearch (1.27.5)
15+
httpclient (~> 2.8, >= 2.8.3)
16+
json (>= 1.5.1)
17+
artifactory (3.0.15)
18+
atomos (0.1.3)
19+
aws-eventstream (1.2.0)
20+
aws-partitions (1.660.0)
21+
aws-sdk-core (3.167.0)
22+
aws-eventstream (~> 1, >= 1.0.2)
23+
aws-partitions (~> 1, >= 1.651.0)
24+
aws-sigv4 (~> 1.5)
25+
jmespath (~> 1, >= 1.6.1)
26+
aws-sdk-kms (1.59.0)
27+
aws-sdk-core (~> 3, >= 3.165.0)
28+
aws-sigv4 (~> 1.1)
29+
aws-sdk-s3 (1.117.1)
30+
aws-sdk-core (~> 3, >= 3.165.0)
31+
aws-sdk-kms (~> 1)
32+
aws-sigv4 (~> 1.4)
33+
aws-sigv4 (1.5.2)
34+
aws-eventstream (~> 1, >= 1.0.2)
35+
babosa (1.0.4)
36+
claide (1.1.0)
37+
cocoapods (1.11.3)
38+
addressable (~> 2.8)
39+
claide (>= 1.0.2, < 2.0)
40+
cocoapods-core (= 1.11.3)
41+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
42+
cocoapods-downloader (>= 1.4.0, < 2.0)
43+
cocoapods-plugins (>= 1.0.0, < 2.0)
44+
cocoapods-search (>= 1.0.0, < 2.0)
45+
cocoapods-trunk (>= 1.4.0, < 2.0)
46+
cocoapods-try (>= 1.1.0, < 2.0)
47+
colored2 (~> 3.1)
48+
escape (~> 0.0.4)
49+
fourflusher (>= 2.3.0, < 3.0)
50+
gh_inspector (~> 1.0)
51+
molinillo (~> 0.8.0)
52+
nap (~> 1.0)
53+
ruby-macho (>= 1.0, < 3.0)
54+
xcodeproj (>= 1.21.0, < 2.0)
55+
cocoapods-core (1.11.3)
56+
activesupport (>= 5.0, < 7)
57+
addressable (~> 2.8)
58+
algoliasearch (~> 1.0)
59+
concurrent-ruby (~> 1.1)
60+
fuzzy_match (~> 2.0.4)
61+
nap (~> 1.0)
62+
netrc (~> 0.11)
63+
public_suffix (~> 4.0)
64+
typhoeus (~> 1.0)
65+
cocoapods-deintegrate (1.0.5)
66+
cocoapods-downloader (1.6.3)
67+
cocoapods-plugins (1.0.0)
68+
nap
69+
cocoapods-search (1.0.1)
70+
cocoapods-trunk (1.6.0)
71+
nap (>= 0.8, < 2.0)
72+
netrc (~> 0.11)
73+
cocoapods-try (1.2.0)
74+
colored (1.2)
75+
colored2 (3.1.2)
76+
commander (4.6.0)
77+
highline (~> 2.0.0)
78+
concurrent-ruby (1.1.10)
79+
declarative (0.0.20)
80+
digest-crc (0.6.4)
81+
rake (>= 12.0.0, < 14.0.0)
82+
domain_name (0.5.20190701)
83+
unf (>= 0.0.5, < 1.0.0)
84+
dotenv (2.8.1)
85+
emoji_regex (3.2.3)
86+
escape (0.0.4)
87+
ethon (0.16.0)
88+
ffi (>= 1.15.0)
89+
excon (0.94.0)
90+
faraday (1.10.2)
91+
faraday-em_http (~> 1.0)
92+
faraday-em_synchrony (~> 1.0)
93+
faraday-excon (~> 1.1)
94+
faraday-httpclient (~> 1.0)
95+
faraday-multipart (~> 1.0)
96+
faraday-net_http (~> 1.0)
97+
faraday-net_http_persistent (~> 1.0)
98+
faraday-patron (~> 1.0)
99+
faraday-rack (~> 1.0)
100+
faraday-retry (~> 1.0)
101+
ruby2_keywords (>= 0.0.4)
102+
faraday-cookie_jar (0.0.7)
103+
faraday (>= 0.8.0)
104+
http-cookie (~> 1.0.0)
105+
faraday-em_http (1.0.0)
106+
faraday-em_synchrony (1.0.0)
107+
faraday-excon (1.1.0)
108+
faraday-httpclient (1.0.1)
109+
faraday-multipart (1.0.4)
110+
multipart-post (~> 2)
111+
faraday-net_http (1.0.1)
112+
faraday-net_http_persistent (1.2.0)
113+
faraday-patron (1.0.0)
114+
faraday-rack (1.0.0)
115+
faraday-retry (1.0.3)
116+
faraday_middleware (1.2.0)
117+
faraday (~> 1.0)
118+
fastimage (2.2.6)
119+
fastlane (2.211.0)
120+
CFPropertyList (>= 2.3, < 4.0.0)
121+
addressable (>= 2.8, < 3.0.0)
122+
artifactory (~> 3.0)
123+
aws-sdk-s3 (~> 1.0)
124+
babosa (>= 1.0.3, < 2.0.0)
125+
bundler (>= 1.12.0, < 3.0.0)
126+
colored
127+
commander (~> 4.6)
128+
dotenv (>= 2.1.1, < 3.0.0)
129+
emoji_regex (>= 0.1, < 4.0)
130+
excon (>= 0.71.0, < 1.0.0)
131+
faraday (~> 1.0)
132+
faraday-cookie_jar (~> 0.0.6)
133+
faraday_middleware (~> 1.0)
134+
fastimage (>= 2.1.0, < 3.0.0)
135+
gh_inspector (>= 1.1.2, < 2.0.0)
136+
google-apis-androidpublisher_v3 (~> 0.3)
137+
google-apis-playcustomapp_v1 (~> 0.1)
138+
google-cloud-storage (~> 1.31)
139+
highline (~> 2.0)
140+
json (< 3.0.0)
141+
jwt (>= 2.1.0, < 3)
142+
mini_magick (>= 4.9.4, < 5.0.0)
143+
multipart-post (~> 2.0.0)
144+
naturally (~> 2.2)
145+
optparse (~> 0.1.1)
146+
plist (>= 3.1.0, < 4.0.0)
147+
rubyzip (>= 2.0.0, < 3.0.0)
148+
security (= 0.1.3)
149+
simctl (~> 1.6.3)
150+
terminal-notifier (>= 2.0.0, < 3.0.0)
151+
terminal-table (>= 1.4.5, < 2.0.0)
152+
tty-screen (>= 0.6.3, < 1.0.0)
153+
tty-spinner (>= 0.8.0, < 1.0.0)
154+
word_wrap (~> 1.0.0)
155+
xcodeproj (>= 1.13.0, < 2.0.0)
156+
xcpretty (~> 0.3.0)
157+
xcpretty-travis-formatter (>= 0.0.3)
158+
ffi (1.15.5)
159+
fourflusher (2.3.1)
160+
fuzzy_match (2.0.4)
161+
gh_inspector (1.1.3)
162+
google-apis-androidpublisher_v3 (0.31.0)
163+
google-apis-core (>= 0.9.1, < 2.a)
164+
google-apis-core (0.9.1)
165+
addressable (~> 2.5, >= 2.5.1)
166+
googleauth (>= 0.16.2, < 2.a)
167+
httpclient (>= 2.8.1, < 3.a)
168+
mini_mime (~> 1.0)
169+
representable (~> 3.0)
170+
retriable (>= 2.0, < 4.a)
171+
rexml
172+
webrick
173+
google-apis-iamcredentials_v1 (0.16.0)
174+
google-apis-core (>= 0.9.1, < 2.a)
175+
google-apis-playcustomapp_v1 (0.12.0)
176+
google-apis-core (>= 0.9.1, < 2.a)
177+
google-apis-storage_v1 (0.19.0)
178+
google-apis-core (>= 0.9.0, < 2.a)
179+
google-cloud-core (1.6.0)
180+
google-cloud-env (~> 1.0)
181+
google-cloud-errors (~> 1.0)
182+
google-cloud-env (1.6.0)
183+
faraday (>= 0.17.3, < 3.0)
184+
google-cloud-errors (1.3.0)
185+
google-cloud-storage (1.44.0)
186+
addressable (~> 2.8)
187+
digest-crc (~> 0.4)
188+
google-apis-iamcredentials_v1 (~> 0.1)
189+
google-apis-storage_v1 (~> 0.19.0)
190+
google-cloud-core (~> 1.6)
191+
googleauth (>= 0.16.2, < 2.a)
192+
mini_mime (~> 1.0)
193+
googleauth (1.3.0)
194+
faraday (>= 0.17.3, < 3.a)
195+
jwt (>= 1.4, < 3.0)
196+
memoist (~> 0.16)
197+
multi_json (~> 1.11)
198+
os (>= 0.9, < 2.0)
199+
signet (>= 0.16, < 2.a)
200+
highline (2.0.3)
201+
http-cookie (1.0.5)
202+
domain_name (~> 0.5)
203+
httpclient (2.8.3)
204+
i18n (1.12.0)
205+
concurrent-ruby (~> 1.0)
206+
jmespath (1.6.1)
207+
json (2.6.2)
208+
jwt (2.5.0)
209+
memoist (0.16.2)
210+
mini_magick (4.11.0)
211+
mini_mime (1.1.2)
212+
minitest (5.16.3)
213+
molinillo (0.8.0)
214+
multi_json (1.15.0)
215+
multipart-post (2.0.0)
216+
nanaimo (0.3.0)
217+
nap (1.1.0)
218+
naturally (2.2.1)
219+
netrc (0.11.0)
220+
optparse (0.1.1)
221+
os (1.1.4)
222+
plist (3.6.0)
223+
public_suffix (4.0.7)
224+
rake (13.0.6)
225+
representable (3.2.0)
226+
declarative (< 0.1.0)
227+
trailblazer-option (>= 0.1.1, < 0.2.0)
228+
uber (< 0.2.0)
229+
retriable (3.1.2)
230+
rexml (3.2.5)
231+
rouge (2.0.7)
232+
ruby-macho (2.5.1)
233+
ruby2_keywords (0.0.5)
234+
rubyzip (2.3.2)
235+
security (0.1.3)
236+
signet (0.17.0)
237+
addressable (~> 2.8)
238+
faraday (>= 0.17.5, < 3.a)
239+
jwt (>= 1.5, < 3.0)
240+
multi_json (~> 1.10)
241+
simctl (1.6.8)
242+
CFPropertyList
243+
naturally
244+
terminal-notifier (2.0.0)
245+
terminal-table (1.8.0)
246+
unicode-display_width (~> 1.1, >= 1.1.1)
247+
trailblazer-option (0.1.2)
248+
tty-cursor (0.7.1)
249+
tty-screen (0.8.1)
250+
tty-spinner (0.9.3)
251+
tty-cursor (~> 0.7)
252+
typhoeus (1.4.0)
253+
ethon (>= 0.9.0)
254+
tzinfo (2.0.5)
255+
concurrent-ruby (~> 1.0)
256+
uber (0.1.0)
257+
unf (0.1.4)
258+
unf_ext
259+
unf_ext (0.0.8.2)
260+
unicode-display_width (1.8.0)
261+
webrick (1.7.0)
262+
word_wrap (1.0.0)
263+
xcodeproj (1.22.0)
264+
CFPropertyList (>= 2.3.3, < 4.0)
265+
atomos (~> 0.1.3)
266+
claide (>= 1.0.2, < 2.0)
267+
colored2 (~> 3.1)
268+
nanaimo (~> 0.3.0)
269+
rexml (~> 3.2.4)
270+
xcpretty (0.3.0)
271+
rouge (~> 2.0.7)
272+
xcpretty-travis-formatter (1.0.1)
273+
xcpretty (~> 0.2, >= 0.0.7)
274+
zeitwerk (2.6.6)
275+
276+
PLATFORMS
277+
ruby
278+
279+
DEPENDENCIES
280+
cocoapods (~> 1.11.3)
281+
fastlane (~> 2.211)
282+
283+
BUNDLED WITH
284+
1.17.2

fastlane/Fastfile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
platform :ios do
2+
before_all do
3+
setup_circle_ci
4+
end
5+
6+
desc "Run all the tests on iOS"
7+
lane :tests do
8+
run_tests(
9+
clean: true,
10+
result_bundle: true,
11+
scheme: "AmplifyUtilsNotifications",
12+
package_path: ".",
13+
sdk: "iphonesimulator",
14+
device: "iPhone 14",
15+
)
16+
end
17+
end
18+
19+
platform :mac do
20+
before_all do
21+
setup_circle_ci
22+
end
23+
24+
desc "Run all the tests on macOS"
25+
lane :tests do
26+
run_tests(
27+
clean: true,
28+
result_bundle: true,
29+
include_simulator_logs: false,
30+
scheme: "AmplifyUtilsNotifications",
31+
package_path: ".",
32+
sdk: "macosx",
33+
destination: "platform=macOS",
34+
)
35+
end
36+
end

0 commit comments

Comments
 (0)