Skip to content

Instantly share code, notes, and snippets.

@NicholasTD07
Created May 10, 2017 23:29
Show Gist options
  • Save NicholasTD07/362fb10cf8c595dcf061a2f581b10728 to your computer and use it in GitHub Desktop.
Save NicholasTD07/362fb10cf8c595dcf061a2f581b10728 to your computer and use it in GitHub Desktop.
Generate code coverage report with Swift Package Manager

Set up

gem install xcov # required | might need sudo
gem install fastlane # optional | might also need sudo

Generate code coverage report

# Need a xcodeproj file first
swift package generate-xcodeproj

# Run the test with either `xcodebuild`
xcodebuild test -scheme TDRedux -enableCodeCoverage YES
# OR fastlane
fastlane scan --code_coverage

# Generate report with `xcov` gem
xcov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment