@@ -46,13 +46,12 @@ jobs:
46
46
- name : Install Rust
47
47
uses : dtolnay/rust-toolchain@master
48
48
with :
49
- components : ' llvm-tools-preview'
50
49
toolchain : stable
51
50
52
- - name : Install grcov
51
+ - name : Install cargo-llvm-cov
53
52
uses : taiki-e/install-action@main
54
53
with :
55
- tool : grcov
54
+ tool : cargo-llvm-cov
56
55
57
56
- name : Tests
58
57
if : ${{ !startsWith(matrix.os, 'ubuntu-') }}
@@ -69,36 +68,20 @@ jobs:
69
68
env :
70
69
CARGO_TERM_COLOR : always
71
70
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
72
- LLVM_PROFILE_FILE : postgresql-%p-%m.profraw
73
71
RUST_LOG : " info,postgresql_archive=debug,postgresql_commands=debug,postgresql_embedded=debug"
74
72
RUST_LOG_SPAN_EVENTS : full
75
- RUSTFLAGS : -Cinstrument-coverage
76
- RUSTDOCFLAGS : -Cinstrument-coverage
77
73
run : |
78
- cargo test --workspace --all-features
79
-
80
- - name : Produce coverage info
81
- if : ${{ startsWith(matrix.os, 'ubuntu-') }}
82
- run : |
83
- grcov $(find . -name "postgresql-*.profraw" -print) \
84
- -s . \
85
- --branch \
86
- --ignore-not-existing \
87
- --ignore='target/*' \
88
- --ignore='benches/*' \
89
- --ignore='/*' \
90
- --binary-path ./target/debug/ \
91
- --excl-line='#\[derive' \
92
- -t lcov \
93
- -o lcov.info
74
+ cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
94
75
95
76
- name : Upload to codecov.io
96
77
if : ${{ startsWith(matrix.os, 'ubuntu-') }}
97
- uses : codecov/codecov-action@v3
78
+ uses : codecov/codecov-action@v4
98
79
with :
99
80
files : lcov.info
100
81
fail_ci_if_error : true
101
- token : ${{ secrets.CODECOV_TOKEN }}
82
+ verbose : true
83
+ env :
84
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
102
85
103
86
- name : Install benchmarking tools
104
87
if : ${{ github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }}
0 commit comments