Skip to content

Commit

Permalink
Generate coverage stats using slather/Coveralls
Browse files Browse the repository at this point in the history
- Modify project file to generate code coverage metrics
- Use slather plugin in Podfile to generate code coverage for projects
  included as CocoaPods
- Modify .travis.yml to update CocoaPods gem and install activesupport;
  default CocoaPods version on Travis CI does not support Podfile plugins,
  and depends on activesupport
- Add step to .travis.yml to install slather and send metrics to
  Coveralls
- Add .slather.yml to configure how we send metrics to Coveralls
- Add coverage files to .gitignore
  • Loading branch information
modocache committed Apr 18, 2015
1 parent 5c2a4cb commit d942965
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Example/WildeGuess/Pod
*xcuserdata
*.xcworkspace
appledoc
*.gcov

5 changes: 5 additions & 0 deletions .slather.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
service: travis_ci
coverage_service: coveralls
xcodeproj: ComponentKit.xcodeproj
source_directory: ComponentKit

7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
language: objective-c

before_install:
- gem install cocoapods
- gem install activesupport
- gem update cocoapods
- gem install slather

script: ./build.sh ci

# Whitelist for branches
branches:
only:
- master

after_success:
- slather
4 changes: 4 additions & 0 deletions ComponentKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,8 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -789,6 +791,8 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
10 changes: 2 additions & 8 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '7.0'

plugin 'slather'

link_with 'ComponentKitTests',
'ComponentKitApplicationTests',
'ComponentTextKitApplicationTests'
pod 'ComponentKit', :path => '.'
pod 'ComponentKitTestLib', :path => './ComponentKitTestLib'
pod 'OCMock', '~> 2.2'









0 comments on commit d942965

Please sign in to comment.