11name : test
22on : [ 'pull_request' ]
3- env :
4- LOG_LEVEL : notice
53
64jobs :
75 linux-unit :
@@ -20,29 +18,19 @@ jobs:
2018 runs-on : ubuntu-latest
2119 env :
2220 LOG_LEVEL : debug
23- MATRIX_CONFIG : ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
2421 steps :
2522 - name : Check out package
2623 uses : actions/checkout@v2
2724 - name : Run unit tests with code coverage and Thread Sanitizer
2825 run : swift test --enable-test-discovery --filter=^PostgresNIOTests --sanitize=thread --enable-code-coverage
29- - name : Convert code coverage report to most expressive format
30- run : |
31- export pkgname="$(swift package dump-package | perl -e 'use JSON::PP; print (decode_json(join("",(<>)))->{name});')" \
32- subpath="$([ "$(uname -s)" = 'Darwin' ] && echo "/Contents/MacOS/${pkgname}PackageTests" || true)" \
33- exc_prefix="$(which xcrun || true)" && \
34- ${exc_prefix} llvm-cov export -format lcov \
35- -instr-profile="$(dirname "$(swift test --show-codecov-path)")/default.profdata" \
36- --ignore-filename-regex='/(\.build|Tests)/' \
37- "$(swift build --show-bin-path)/${pkgname}PackageTests.xctest${subpath}" >"${pkgname}.lcov"
38- echo "CODECOV_FILE=$(pwd)/${pkgname}.lcov" >> "${GITHUB_ENV}"
39- - name : Send coverage report to codecov.io
40- uses : codecov/codecov-action@v2
26+ - name : Submit coverage report to Codecov.io
27+ 4128 with :
42- files : ${{ env.CODECOV_FILE }}
43- flags : ' unittests'
44- env_vars : ' MATRIX_CONFIG'
45- fail_ci_if_error : true
29+ cc_flags : ' unittests'
30+ cc_env_vars : ' SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH'
31+ cc_fail_ci_if_error : true
32+ cc_verbose : true
33+ cc_dry_run : false
4634
4735 linux-integration-and-dependencies :
4836 strategy :
0 commit comments