This action converts code coverage files from swift test
or xcodebuild
runs for processing with e.g. codecov.
Note that this action does not run any test. Use swift test
, xcodebuild
or xcodebuild-action for that.
A list of search paths (one per line) that should be used for searching coverage data.
Default:
./.build
$HOME/Library/Developer/Xcode/DerivedData
The path to the output folder. Note that this folder will be deleted / overwritten by this action.
You should probably put it in .gitignore
.
Default: ./.swiftcov
The format to write the coverage files in. Can be 'lcov' or 'txt'.
Default: lcov
A regular expression that is used to filter coverage files by their target names.
If true
, conversion failures are ignored. If fail-on-empty-output
is also set to true
, the action might still fail if all conversions fail.
Default: 'false'
If true
, the action fails if no coverage files were found (output is still set to an empty array).
Default: 'false'
The JSON encoded array of (absolute) file paths that were written. They are all contained inside the directory specified in the output
input.
Use the following snippet after running tests with Swift or Xcode to convert those coverage files:
uses: sersoft-gmbh/swift-coverage-action@v4
To use this action together with codecov/codecov-action, you need to convert the output to a comma separated string:
- uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}