From d78c0b4e137a68001e9cd54b3a8ff95f8c8db515 Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Sun, 23 Oct 2016 17:22:19 -0700 Subject: [PATCH] Add Coveralls support and badge Summary: Adding Coverall support and badge in README. Waiting on tests. Fixes #37 - [x] All tests pass. Demo project builds and runs. - [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/CONTRIBUTING.md) Closes https://github.com/Instagram/IGListKit/pull/110 Differential Revision: D4066685 Pulled By: rnystrom fbshipit-source-id: a9f148fe87e9d25c60afca88c02410898db9b10a --- .slather.yml | 6 ++++++ .travis.yml | 5 ++++- Gemfile | 1 + Gemfile.lock | 12 +++++++++++- IGListKit.xcodeproj/project.pbxproj | 2 ++ README.md | 2 +- 6 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .slather.yml diff --git a/.slather.yml b/.slather.yml new file mode 100644 index 00000000..78da1768 --- /dev/null +++ b/.slather.yml @@ -0,0 +1,6 @@ +ci_service: travis_ci +coverage_service: coveralls +xcodeproj: IGListKit.xcodeproj +workspace: IGListKit.xcworkspace +scheme: IGListKit +source_directory: Source diff --git a/.travis.yml b/.travis.yml index 37801727..b00372b5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,10 @@ script: - if [ $RUN_TESTS == "YES" ]; then - xcodebuild analyze test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c; + xcodebuild analyze test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c; else xcodebuild build analyze -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c; fi + +after_success: + - cd $TRAVIS_BUILD_DIR && bundle exec slather \ No newline at end of file diff --git a/Gemfile b/Gemfile index 4af33805..949127e9 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,4 @@ source 'https://rubygems.org' gem 'cocoapods', '1.1.0.rc.3' gem 'xcpretty', '0.2.4' +gem 'slather', '2.3.0' diff --git a/Gemfile.lock b/Gemfile.lock index b4700d7e..5af22cc8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,6 +8,7 @@ GEM thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) claide (1.0.1) + clamp (0.6.5) cocoapods (1.1.0.rc.3) activesupport (>= 4.0.2, < 5) claide (>= 1.0.1, < 2.0) @@ -47,11 +48,19 @@ GEM gh_inspector (1.0.2) i18n (0.7.0) json (1.8.3) + mini_portile2 (2.1.0) minitest (5.9.1) molinillo (0.5.1) nap (1.1.0) netrc (0.7.8) + nokogiri (1.6.8.1) + mini_portile2 (~> 2.1.0) rouge (1.11.1) + slather (2.3.0) + activesupport (>= 4.0.2, < 5) + clamp (~> 0.6) + nokogiri (~> 1.6.3) + xcodeproj (>= 0.20, < 2.0.0) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) @@ -67,7 +76,8 @@ PLATFORMS DEPENDENCIES cocoapods (= 1.1.0.rc.3) + slather (= 2.3.0) xcpretty (= 0.2.4) BUNDLED WITH - 1.13.1 + 1.13.6 diff --git a/IGListKit.xcodeproj/project.pbxproj b/IGListKit.xcodeproj/project.pbxproj index cf46daec..c1472c8b 100644 --- a/IGListKit.xcodeproj/project.pbxproj +++ b/IGListKit.xcodeproj/project.pbxproj @@ -700,6 +700,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -752,6 +753,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_CODE_COVERAGE = YES; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/README.md b/README.md index 47bc5c40..1a2ee464 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

-[![Build Status](https://travis-ci.org/Instagram/IGListKit.svg?branch=master)](https://travis-ci.org/Instagram/IGListKit) [![Version Status](https://img.shields.io/cocoapods/v/IGListKit.svg)](https://cocoapods.org/pods/IGListKit) [![license BSD](https://img.shields.io/cocoapods/l/IGListKit.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Platform](https://img.shields.io/cocoapods/p/IGListKit.svg)](https://instagram.github.io/IGListKit) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Build Status](https://travis-ci.org/Instagram/IGListKit.svg?branch=master)](https://travis-ci.org/Instagram/IGListKit) [![Version Status](https://img.shields.io/cocoapods/v/IGListKit.svg)](https://cocoapods.org/pods/IGListKit) [![license BSD](https://img.shields.io/cocoapods/l/IGListKit.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Platform](https://img.shields.io/cocoapods/p/IGListKit.svg)](https://instagram.github.io/IGListKit) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Coverage Status](https://coveralls.io/repos/github/Instagram/IGListKit/badge.svg?branch=master)](https://coveralls.io/github/Instagram/IGListKit?branch=master) ------------------------