Skip to content

Instantly share code, notes, and snippets.

@mna
Created August 22, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mna/efd500d9a1de1a46c9b693adebd08021 to your computer and use it in GitHub Desktop.
Save mna/efd500d9a1de1a46c9b693adebd08021 to your computer and use it in GitHub Desktop.
Code coverage for Swift Package Manager-based projects
# Using https://github.com/nakiostudio/xcov
.PHONY: test-cov
test-cov:
@swift package generate-xcodeproj
@xcodebuild -scheme MYSCHEME -derivedDataPath .build/xcode -enableCodeCoverage YES test
@xcov --scheme MYSCHEME --configuration Debug --derived_data_path .build/xcode --skip_slack --markdown_report
@rm -rf .build/xcode
@open xcov_report/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment