Codecov: Swift coverage example
Switch branches/tags
Nothing to show
Clone or download
Latest commit 4a0478c Apr 26, 2018
Failed to load latest commit information.
SwiftExample.xcodeproj disable UI tests Sep 24, 2015
SwiftExample.xcworkspace add workspace Nov 22, 2015
SwiftExample Initial commit Sep 24, 2015
SwiftExampleTests Initial commit Sep 24, 2015
SwiftExampleUITests disable UI tests Sep 24, 2015
docs add README Sep 24, 2015
.gitignore Initial commit Sep 24, 2015
.travis.yml inline tests Sep 30, 2016 Update Apr 26, 2018

Codecov Swift Example

Build Status

This repository serves as an example on how to use Codecov Global for Swift.


Enable "Gather coverage data" in your test scheme:

gather coverage data

Travis CI

Add to your .travis.yml file.

language: swift # or objective-c
osx_image: xcode7
  - xcodebuild -scheme SwiftExample -workspace SwiftExample.xcworkspace -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6S,OS=9.1' build test
  - bash <(curl -s

Private Repos

Set CODECOV_TOKEN in your environment variables.

Add to your .travis.yml file.

  - bash <(curl -s -t uuid-repo-token

Or you can set the environment variable CODECOV_TOKEN to your token.

Speed up the build

The uploader has a boil-the-ocean approach, which can take a longer time to complete coverage report processing. We suggest you add the following to only build reports for the project being tested:

bash <(curl -s -J 'SwiftExample'

Use your project name instead of SwiftExample. You can also provide multiple arguments via -J 'ProjA' -J 'ProjB'


Xcode8/Swift3 resulting in 0% coverage.

  1. Update the test scheme with Xcode 8
  2. Do not use xcpretty. Seems broken with code coverage Xcode 8...

Example project with Xcode8/Swift3: yannickl/DynamicColor

We are happy to help if you have any questions. Please contact email our Support at