From 3ba663fe83e25847f16163375a101e6563e9d4b0 Mon Sep 17 00:00:00 2001 From: Felix M Date: Sun, 19 May 2019 07:36:14 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=20::=20Add=20codecov.io=20support?= =?UTF-8?q?=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ :: Add codecov.io support * 🐛 :: Fix wrong workspace / scheme name * ✏️ :: Added shield for code coverage --- .travis.yml | 4 +++- .../xcschemes/GradientLoadingBar-Example.xcscheme | 11 +++++++++++ Scripts/test.sh | 7 +++---- codecov.yml | 2 ++ readme.md | 4 ++-- 5 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 codecov.yml diff --git a/.travis.yml b/.travis.yml index d7fae3b..7dd3c08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,5 +14,7 @@ before_install: script: - ./Scripts/swift-format.sh - ./Scripts/swift-lint.sh +- ./Scripts/pod-lint.sh - ./Scripts/test.sh -- ./Scripts/pod-lint.sh \ No newline at end of file +after_success: +- bash <(curl -s https://codecov.io/bash) diff --git a/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme b/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme index e4ea7f8..d2fd548 100644 --- a/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme +++ b/Example/GradientLoadingBar.xcodeproj/xcshareddata/xcschemes/GradientLoadingBar-Example.xcscheme @@ -40,7 +40,18 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + codeCoverageEnabled = "YES" + onlyGenerateCoverageForSpecifiedTargets = "YES" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + diff --git a/Scripts/test.sh b/Scripts/test.sh index 8fe601b..bbc0791 100755 --- a/Scripts/test.sh +++ b/Scripts/test.sh @@ -6,6 +6,7 @@ # - http://www.mokacoding.com/blog/running-tests-from-the-terminal/ # - https://github.com/supermarin/xcpretty#usage # - https://www.objc.io/issues/6-build-tools/travis-ci/ +# - https://github.com/codecov/example-swift # #!/bin/bash @@ -14,8 +15,6 @@ cd Example/ xcodebuild \ -workspace GradientLoadingBar.xcworkspace \ -scheme GradientLoadingBar-Example \ - -enableCodeCoverage YES \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone XR,OS=12.0' \ - ONLY_ACTIVE_ARCH=NO \ - test | xcpretty && exit ${PIPESTATUS[0]} + -destination 'platform=iOS Simulator,name=iPhone XR,OS=12.2' \ + build test | xcpretty && exit ${PIPESTATUS[0]} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..4bf452b --- /dev/null +++ b/codecov.yml @@ -0,0 +1,2 @@ +ignore: + - "Example" # ignore test coverage of example application \ No newline at end of file diff --git a/readme.md b/readme.md index a726fbf..435d5f9 100644 --- a/readme.md +++ b/readme.md @@ -1,11 +1,11 @@ GradientLoadingBar ==================== -![Swift5.0](https://img.shields.io/badge/Swift-5.0-green.svg?style=flat) [![CI Status](http://img.shields.io/travis/fxm90/GradientLoadingBar.svg?style=flat)](https://travis-ci.org/fxm90/GradientLoadingBar) [![Version](https://img.shields.io/cocoapods/v/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) [![License](https://img.shields.io/cocoapods/l/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) [![Platform](https://img.shields.io/cocoapods/p/GradientLoadingBar.svg?style=flat)](http://cocoapods.org/pods/GradientLoadingBar) +![Swift5.0](https://img.shields.io/badge/Swift-5.0-green.svg?style=flat) [![CI Status](http://img.shields.io/travis/fxm90/GradientLoadingBar.svg?style=flat)](https://travis-ci.org/fxm90/GradientLoadingBar) ![Code Coverage](https://img.shields.io/codecov/c/github/fxm90/GradientLoadingBar.svg?style=flat) ![Version](https://img.shields.io/cocoapods/v/GradientLoadingBar.svg?style=flat) ![License](https://img.shields.io/cocoapods/l/GradientLoadingBar.svg?style=flat) ![Platform](https://img.shields.io/cocoapods/p/GradientLoadingBar.svg?style=flat) -### Example A customizable animated gradient loading bar. Inspired by [iOS 7 Progress Bar from Codepen](https://codepen.io/marcobiedermann/pen/LExXWW). +### Example ![Example](http://felix.hamburg/files/github/gradient-loading-bar/screen.gif) To run the example project, clone the repo, and open the workspace from the Example directory. From b3868b788148f6f198a20e2324281c3e317b25a9 Mon Sep 17 00:00:00 2001 From: Felix Mau Date: Sun, 19 May 2019 08:29:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20::=20added=20author=20and=20?= =?UTF-8?q?further=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- codecov.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 4bf452b..b6457ab 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,2 +1,13 @@ +# +# codecov.yml +# Created by Felix Mau (https://felix.hamburg) +# +# How to: +# - https://github.com/codecov/example-swift +# +# Documentation: +# - https://docs.codecov.io/docs/ +# + ignore: - - "Example" # ignore test coverage of example application \ No newline at end of file + - "Example" # ignore test coverage of example application From 62bf42820a7c848ffc82455345a9a1a57f88330b Mon Sep 17 00:00:00 2001 From: Felix Mau Date: Sun, 19 May 2019 08:29:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20::=20Renamed=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configuration files should start with a dot. --- codecov.yml => .codecov.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename codecov.yml => .codecov.yml (100%) diff --git a/codecov.yml b/.codecov.yml similarity index 100% rename from codecov.yml rename to .codecov.yml