All Projects → codecov → Example Swift

codecov / Example Swift

Codecov: Swift coverage example

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Example Swift

travis-ci-tutorial-java
Just to learn how to use travis-ci in a java project!
Stars: ✭ 38 (-68.6%)
Mutual labels:  coverage, codecov
CPP Template
C++ project template : CMake, Test, Travis CI, Appveyor, CodeCoverage, Doxygen
Stars: ✭ 32 (-73.55%)
Mutual labels:  coverage, codecov
gocoverutil
No description or website provided.
Stars: ✭ 25 (-79.34%)
Mutual labels:  coverage, codecov
Moderncppstarter
🚀 Kick-start your C++! A template for modern C++ projects using CMake, CI, code coverage, clang-format, reproducible dependency management and much more.
Stars: ✭ 2,381 (+1867.77%)
Mutual labels:  coverage, codecov
Covr
Test coverage reports for R
Stars: ✭ 285 (+135.54%)
Mutual labels:  coverage, codecov
Codecov Bash
Global coverage report uploader for Codecov
Stars: ✭ 220 (+81.82%)
Mutual labels:  coverage, codecov
ts-node-starter
GitHub template to get started with Node.js & TypeScript. ⚡
Stars: ✭ 28 (-76.86%)
Mutual labels:  coverage, codecov
Codecov Python
Python report uploader for Codecov
Stars: ✭ 162 (+33.88%)
Mutual labels:  coverage, codecov
Codecov Node
Global coverage report uploader for Codecov in NodeJS
Stars: ✭ 268 (+121.49%)
Mutual labels:  coverage, codecov
phpunit-travis-ci-coverage-example
phpUnit Testing on Travis-CI with Code Coverage on CodeCov
Stars: ✭ 30 (-75.21%)
Mutual labels:  coverage, codecov
Example Cpp11 Cmake
Stars: ✭ 129 (+6.61%)
Mutual labels:  coverage, codecov
Kcov
Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
Stars: ✭ 515 (+325.62%)
Mutual labels:  coverage, codecov
example-objc
Codecov example for Xcode
Stars: ✭ 24 (-80.17%)
Mutual labels:  coverage, codecov
enterprise
Code coverage done right.® On-premise enterprise version.
Stars: ✭ 63 (-47.93%)
Mutual labels:  coverage, codecov
Learn Istanbul
🏁 Learn how to use the Istanbul JavaScript Code Coverage Tool
Stars: ✭ 332 (+174.38%)
Mutual labels:  coverage, codecov
Example Gradle
Stars: ✭ 68 (-43.8%)
Mutual labels:  coverage, codecov
Devel Cover
Code coverage metrics for Perl
Stars: ✭ 91 (-24.79%)
Mutual labels:  coverage
Coverage.vim
code coverage vim plugin
Stars: ✭ 106 (-12.4%)
Mutual labels:  coverage
Ddd Tdd Rich Domain Model Dojo Kata
DDD patterns implemented following TDD
Stars: ✭ 91 (-24.79%)
Mutual labels:  coverage
Swagger Coverage
Tool which generates full picture of coverage of API tests based on OAS 2 (Swagger)
Stars: ✭ 89 (-26.45%)
Mutual labels:  coverage

Codecov Swift Example

Build Status codecov.io FOSSA Status

Guide

Travis Setup

Add to your .travis.yml file.

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)

Produce Coverage Reports

Enable "Gather coverage data" in your test scheme: gather coverage data

Bitrise CI

  1. Open dashboard.
  2. Click on workflow
  3. Add a workflow step
  4. Search for Codecov
  5. Paste the Codecov Token
  6. You are all set

Private Repos

Set CODECOV_TOKEN in your environment variables.

Strategies for producing coverage reports

plist coverage default

This technique will upload the plist containing coverage data.

  • This format includes all files and projects. However, this can be very large causing issues processing.
  • Partial coverage data is included, which will look beautiful in Codecov UI.

Again, this is enabled by default.

llvm-cov

This technique will run llvm-cov which produces coverage reports.

  • You can specify specific packages to run coverage against (see below)
  • No partial coverage data

To enable:

bash <(curl -s https://codecov.io/bash) -X xcodellvm
# - or -
bash <(curl -s https://codecov.io/bash) -J '^MyPackage$'
# ^^ will enable xcodellvm and only process MyPackage coverage

You may provide your Codecov token by either:

  • Setting CODECOV_TOKEN in your environment variables and adding the following to Travis:
after_success:
  - bash <(curl -s https://codecov.io/bash)
  • Providing the Codecov token directly to the invocation by adding the following to Travis:
after_success:
  - bash <(curl -s https://codecov.io/bash) -t {YOUR-TOKEN-HERE}

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'

Caveats

Private Repos

Set CODECOV_TOKEN in your environment variables.

Add to your .travis.yml file.

after_success:
  - bash <(curl -s https://codecov.io/bash) -t uuid-repo-token

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

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

Parsing Xcode 10 Coverage Reports

Older versions of Codecov (<4.4) are not able to parse the coverage output directly from Xcode 10. As a workaround, you can feed the raw coverage information to a tool such as Slather, have it create a Cobertura XML style report, and upload that to Codecov. Detailed information on this workaround can be found (here)[https://github.com/SlatherOrg/slather#usage-with-codecov].

Support

Contact

  1. More documentation at https://docs.codecov.io
  2. Configure codecov through the codecov.yml https://docs.codecov.io/docs/codecov-yaml

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

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].