1
1
name : test
2
2
on : [ 'pull_request' ]
3
- env :
4
- LOG_LEVEL : notice
5
3
6
4
jobs :
7
5
linux-unit :
@@ -20,29 +18,19 @@ jobs:
20
18
runs-on : ubuntu-latest
21
19
env :
22
20
LOG_LEVEL : debug
23
- MATRIX_CONFIG : ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
24
21
steps :
25
22
- name : Check out package
26
23
uses : actions/checkout@v2
27
24
- name : Run unit tests with code coverage and Thread Sanitizer
28
25
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
+
41
28
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
46
34
47
35
linux-integration-and-dependencies :
48
36
strategy :
0 commit comments