Skip to content

Commit

Permalink
Merge pull request #18 from ibm-bluemix-mobile-services/development
Browse files Browse the repository at this point in the history
Add code coverage reporting with Coveralls
  • Loading branch information
Anthony Oliveri authored Mar 17, 2017
2 parents bae91f5 + c832cf2 commit 37bfde0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.build
/Packages
/*.xcodeproj
Build/
5 changes: 5 additions & 0 deletions .slather.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage_service: coveralls
xcodeproj: SimpleHttpClient.xcodeproj
scheme: SimpleHttpClient
ignore:
- Tests/*
18 changes: 17 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
os:
- linux
- osx

language: generic

env:
Expand All @@ -16,18 +17,33 @@ sudo: required

dist: trusty

osx_image: xcode8
osx_image: xcode8.2

before_install:
- rvm install 2.4.0

install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
eval "$(cat ./install-swiftenv.sh)";
sudo apt-get install -y libcurl4-openssl-dev libblocksruntime-dev libkqueue-dev libpthread-workqueue-dev libbsd-dev;
sudo rm /usr/bin/ld && sudo ln -s /usr/bin/ld.gold /usr/bin/ld;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
gem install slather;
fi
- git --version

script:
- swift build --clean # clean built artifacts if present
- swift package fetch # clones all dependencies
- swift build # build project
- swift test # run tests

after_success:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
swift package generate-xcodeproj;
slather setup SimpleHttpClient.xcodeproj;
xcodebuild -project SimpleHttpClient.xcodeproj -scheme SimpleHttpClient build;
xcodebuild test -project SimpleHttpClient.xcodeproj -scheme SimpleHttpClient -enableCodeCoverage YES;
slather coverage --coveralls --binary-basename SimpleHttpClient.framework -v;
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Platform][platform-badge]][platform-url]
[![Build Status](https://travis-ci.org/ibm-bluemix-mobile-services/bluemix-simple-http-client-swift.svg?branch=master)](https://travis-ci.org/ibm-bluemix-mobile-services/bluemix-simple-http-client-swift)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/25b6fd1941dc49e8991a20325ddd2105)](https://www.codacy.com/app/ibm-bluemix-mobile-services/bluemix-simple-http-client-swift?utm_source=github.com&utm_medium=referral&utm_content=ibm-bluemix-mobile-services/bluemix-simple-http-client-swift&utm_campaign=Badge_Grade)
[![Coverage Status](https://coveralls.io/repos/github/ibm-bluemix-mobile-services/bluemix-simple-http-client-swift/badge.svg?branch=development)](https://coveralls.io/github/ibm-bluemix-mobile-services/bluemix-simple-http-client-swift?branch=development)

[swift-badge]: https://img.shields.io/badge/Swift-3.0-orange.svg
[swift-url]: https://swift.org
Expand Down

0 comments on commit 37bfde0

Please sign in to comment.