File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2323 - name : Check out package
2424 uses : actions/checkout@v2
2525 - name : Run unit tests with code coverage
26+ run : swift test --enable-test-discovery --filter=^PostgresNIOTests --enable-code-coverage
27+ - name : Convert code coverage report to most expressive format
2628 run : |
27- swift test --enable-test-discovery --filter=^PostgresNIOTests --enable-code-coverage && \
28- echo "CODECOV_FILE=$(swift test --show-codecov-path)" >> $GITHUB_ENV
29+ export pkgname="$(swift package dump-package | perl -e 'use JSON::PP; print (decode_json(join("",(<>)))->{name});')" \
30+ subpath="$([ "$(uname -s)" = 'Darwin' ] && echo "/Contents/MacOS/${pkgname}PackageTests" || true)" \
31+ exc_prefix="$(which xcrun || true)" && \
32+ ${exc_prefix} llvm-cov export -format lcov \
33+ -instr-profile="$(dirname "$(swift test --show-codecov-path)")/default.profdata" \
34+ --ignore-filename-regex='\.build/' \
35+ "$(swift build --show-bin-path)/${pkgname}PackageTests.xctest${subpath}" \
36+ >"${pkgname}.lcov"
37+ echo "CODECOV_FILE=$(pwd)/${pkgname}.lcov" >> $GITHUB_ENV
2938 - name : Send coverage report to codecov.io
3039 uses : codecov/codecov-action@v2
3140 with :
You can’t perform that action at this time.
0 commit comments