Codecov Swift Example
This repository serves as an example on how to use Codecov Global for Swift.
Enable "Gather coverage data" in your test scheme:
Add to your
language: swift # or objective-c osx_image: xcode7 script: - xcodebuild -scheme SwiftExample -workspace SwiftExample.xcworkspace -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6S,OS=9.1' build test after_success: - bash <(curl -s https://codecov.io/bash)
CODECOV_TOKENin your environment variables.
Add to your
after_success: - bash <(curl -s https://codecov.io/bash) -t uuid-repo-token
Or you can set the environment variable
CODECOV_TOKENto 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 https://codecov.io/bash) -J 'SwiftExample'
Use your project name instead of
SwiftExample. You can also provide multiple arguments via
-J 'ProjA' -J 'ProjB'
Xcode8/Swift3 resulting in
- Update the test scheme with Xcode 8
- 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 firstname.lastname@example.org