Skip to content

Commit d5f1efc

Browse files
committed
Merge pull request #3 from danthorpe/feature/FX-3_coveralls
Move Code Coverage to Coveralls
2 parents f3553b3 + 3b1b1dc commit d5f1efc

File tree

15 files changed

+163
-59
lines changed

15 files changed

+163
-59
lines changed

.ci/buildkite/pipeline.template.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
steps:
2+
-
3+
name: ":muscle: Lint"
4+
command: .ci/scripts/lint
25
-
36
name: ":fastlane: Test iOS"
47
command: .ci/scripts/test-ios

.ci/scripts/lint

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
source /usr/local/opt/chruby/share/chruby/chruby.sh
3+
chruby ruby
4+
bundle exec fastlane lint

.ci/scripts/send-coverage

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
#!/usr/bin/env bash
2-
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -D .ci/xcodebuild-data
2+
source /usr/local/opt/chruby/share/chruby/chruby.sh
3+
chruby ruby
4+
bundle exec slather coverage --scheme "FX-iOS" --buildkite --coveralls --build-directory .ci/xcodebuild-data

.fastlane/Fastfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2+
lane :lint do
3+
4+
swiftLint(
5+
mode: :lint,
6+
config_file: '.swiftlint.yml'
7+
)
8+
end
9+
110
platform :ios do
211

312
desc "Runs all the tests"
File renamed without changes.

.slather.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
coverage_service: coveralls
2+
xcodeproj: FX.xcodeproj
3+
build_directory: .ci/xcodebuild-data
4+
ignore:
5+
- Tests/*
6+
- Supporting Files/*

.swiftlint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
excluded:
2+
- Carthage
3+
- Tests
4+
disabled_rules:
5+
# - valid_docs
6+
# - statement_position
7+
- line_length
8+
- type_name
9+
- variable_name
10+
file_length:
11+
warning: 750
12+
error: 1200
13+

FX.xcodeproj/project.pbxproj

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@
381381
isa = PBXNativeTarget;
382382
buildConfigurationList = 65F6F8AF1C62B84500155987 /* Build configuration list for PBXNativeTarget "FX-iOS" */;
383383
buildPhases = (
384+
6564A21A1CA34CDD00ED2F77 /* Swift Lint */,
384385
65F6F8941C62B84500155987 /* Sources */,
385386
65F6F8951C62B84500155987 /* Frameworks */,
386387
65F6F8961C62B84500155987 /* Headers */,
@@ -418,6 +419,7 @@
418419
isa = PBXNativeTarget;
419420
buildConfigurationList = 65F6F8BB1C62B87E00155987 /* Build configuration list for PBXNativeTarget "FX-watchOS" */;
420421
buildPhases = (
422+
6564A21B1CA34CFB00ED2F77 /* Swift Lint */,
421423
65F6F8B11C62B87E00155987 /* Sources */,
422424
65F6F8B21C62B87E00155987 /* Frameworks */,
423425
65F6F8B31C62B87E00155987 /* Headers */,
@@ -436,6 +438,7 @@
436438
isa = PBXNativeTarget;
437439
buildConfigurationList = 65F6F8D41C62B89D00155987 /* Build configuration list for PBXNativeTarget "FX-tvOS" */;
438440
buildPhases = (
441+
6564A21C1CA34D1700ED2F77 /* Swift Lint */,
439442
65F6F8BE1C62B89D00155987 /* Sources */,
440443
65F6F8BF1C62B89D00155987 /* Frameworks */,
441444
65F6F8C01C62B89D00155987 /* Headers */,
@@ -473,6 +476,7 @@
473476
isa = PBXNativeTarget;
474477
buildConfigurationList = 65F6F8F01C62B8DA00155987 /* Build configuration list for PBXNativeTarget "FX-OSX" */;
475478
buildPhases = (
479+
6564A21D1CA34D2B00ED2F77 /* Swift Lint */,
476480
65F6F8DA1C62B8DA00155987 /* Sources */,
477481
65F6F8DB1C62B8DA00155987 /* Frameworks */,
478482
65F6F8DC1C62B8DA00155987 /* Headers */,
@@ -629,6 +633,66 @@
629633
/* End PBXResourcesBuildPhase section */
630634

631635
/* Begin PBXShellScriptBuildPhase section */
636+
6564A21A1CA34CDD00ED2F77 /* Swift Lint */ = {
637+
isa = PBXShellScriptBuildPhase;
638+
buildActionMask = 2147483647;
639+
files = (
640+
);
641+
inputPaths = (
642+
);
643+
name = "Swift Lint";
644+
outputPaths = (
645+
);
646+
runOnlyForDeploymentPostprocessing = 0;
647+
shellPath = /bin/sh;
648+
shellScript = "if which swiftlint >/dev/null; then\n swiftlint autocorrect\n [ -f .swiftlint.yml ] && CONFIG=\".swiftlint.yml\" || CONFIG=\"$HOME/.swiftlint.yml\"\n swiftlint lint --config $CONFIG\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
649+
showEnvVarsInLog = 0;
650+
};
651+
6564A21B1CA34CFB00ED2F77 /* Swift Lint */ = {
652+
isa = PBXShellScriptBuildPhase;
653+
buildActionMask = 2147483647;
654+
files = (
655+
);
656+
inputPaths = (
657+
);
658+
name = "Swift Lint";
659+
outputPaths = (
660+
);
661+
runOnlyForDeploymentPostprocessing = 0;
662+
shellPath = /bin/sh;
663+
shellScript = "if which swiftlint >/dev/null; then\n swiftlint autocorrect\n [ -f .swiftlint.yml ] && CONFIG=\".swiftlint.yml\" || CONFIG=\"$HOME/.swiftlint.yml\"\n swiftlint lint --config $CONFIG\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
664+
showEnvVarsInLog = 0;
665+
};
666+
6564A21C1CA34D1700ED2F77 /* Swift Lint */ = {
667+
isa = PBXShellScriptBuildPhase;
668+
buildActionMask = 2147483647;
669+
files = (
670+
);
671+
inputPaths = (
672+
);
673+
name = "Swift Lint";
674+
outputPaths = (
675+
);
676+
runOnlyForDeploymentPostprocessing = 0;
677+
shellPath = /bin/sh;
678+
shellScript = "if which swiftlint >/dev/null; then\n swiftlint autocorrect\n [ -f .swiftlint.yml ] && CONFIG=\".swiftlint.yml\" || CONFIG=\"$HOME/.swiftlint.yml\"\n swiftlint lint --config $CONFIG\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
679+
showEnvVarsInLog = 0;
680+
};
681+
6564A21D1CA34D2B00ED2F77 /* Swift Lint */ = {
682+
isa = PBXShellScriptBuildPhase;
683+
buildActionMask = 2147483647;
684+
files = (
685+
);
686+
inputPaths = (
687+
);
688+
name = "Swift Lint";
689+
outputPaths = (
690+
);
691+
runOnlyForDeploymentPostprocessing = 0;
692+
shellPath = /bin/sh;
693+
shellScript = "if which swiftlint >/dev/null; then\n swiftlint autocorrect\n [ -f .swiftlint.yml ] && CONFIG=\".swiftlint.yml\" || CONFIG=\"$HOME/.swiftlint.yml\"\n swiftlint lint --config $CONFIG\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
694+
showEnvVarsInLog = 0;
695+
};
632696
65C6D35E1C640AFF0090F6B3 /* Carthage Copy Frameworks */ = {
633697
isa = PBXShellScriptBuildPhase;
634698
buildActionMask = 2147483647;

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
source 'https://rubygems.org'
22

3+
gem 'slather'
34
gem 'scan'
45
gem 'fastlane', '>= 1.35'
56
gem 'xcpretty'

Gemfile.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ GEM
1313
fastlane_core (>= 0.29.1, < 1.0.0)
1414
spaceship (>= 0.22.0, < 1.0.0)
1515
claide (0.9.1)
16+
clamp (0.6.5)
1617
colored (1.2)
1718
commander (4.3.5)
1819
highline (~> 1.7.2)
@@ -143,13 +144,16 @@ GEM
143144
mime-types-data (~> 3.2015)
144145
mime-types-data (3.2016.0221)
145146
mini_magick (4.0.4)
147+
mini_portile2 (2.0.0)
146148
minitest (5.8.4)
147149
multi_json (1.11.2)
148150
multi_xml (0.5.5)
149151
multipart-post (2.0.0)
150152
net-sftp (2.1.2)
151153
net-ssh (>= 2.6.5)
152154
net-ssh (3.1.1)
155+
nokogiri (1.6.7.2)
156+
mini_portile2 (~> 2.0.0.rc2)
153157
os (0.9.6)
154158
pem (1.3.0)
155159
fastlane_core (>= 0.36.1, < 1.0.0)
@@ -189,6 +193,10 @@ GEM
189193
jwt (~> 1.5)
190194
multi_json (~> 1.10)
191195
slack-notifier (1.5.1)
196+
slather (2.0.1)
197+
clamp (~> 0.6)
198+
nokogiri (~> 1.6.3)
199+
xcodeproj (>= 0.28.2, < 1.1.0)
192200
snapshot (1.12.1)
193201
fastimage (~> 1.6.3)
194202
fastlane_core (>= 0.36.1, < 1.0.0)
@@ -232,6 +240,7 @@ PLATFORMS
232240
DEPENDENCIES
233241
fastlane (>= 1.35)
234242
scan
243+
slather
235244
xcpretty
236245

237246
BUNDLED WITH

0 commit comments

Comments
 (0)