@@ -46,13 +46,12 @@ jobs:
4646 - name : Install Rust
4747 uses : dtolnay/rust-toolchain@master
4848 with :
49- components : ' llvm-tools-preview'
5049 toolchain : stable
5150
52- - name : Install grcov
51+ - name : Install cargo-llvm-cov
5352 uses : taiki-e/install-action@main
5453 with :
55- tool : grcov
54+ tool : cargo-llvm-cov
5655
5756 - name : Tests
5857 if : ${{ !startsWith(matrix.os, 'ubuntu-') }}
@@ -69,36 +68,20 @@ jobs:
6968 env :
7069 CARGO_TERM_COLOR : always
7170 GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
72- LLVM_PROFILE_FILE : postgresql-%p-%m.profraw
7371 RUST_LOG : " info,postgresql_archive=debug,postgresql_commands=debug,postgresql_embedded=debug"
7472 RUST_LOG_SPAN_EVENTS : full
75- RUSTFLAGS : -Cinstrument-coverage
76- RUSTDOCFLAGS : -Cinstrument-coverage
7773 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
9475
9576 - name : Upload to codecov.io
9677 if : ${{ startsWith(matrix.os, 'ubuntu-') }}
97- uses : codecov/codecov-action@v3
78+ uses : codecov/codecov-action@v4
9879 with :
9980 files : lcov.info
10081 fail_ci_if_error : true
101- token : ${{ secrets.CODECOV_TOKEN }}
82+ verbose : true
83+ env :
84+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
10285
10386 - name : Install benchmarking tools
10487 if : ${{ github.ref == 'refs/heads/main' && startsWith(matrix.os, 'ubuntu-') }}
0 commit comments