Skip to content

Commit ecdfb2b

Browse files
committed
ci: fix coverage tests
1 parent badb5c8 commit ecdfb2b

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,22 @@ jobs:
153153
- name: Generate coverage report
154154
run: |
155155
cargo llvm-cov clean --workspace
156-
cargo llvm-cov --workspace --no-report --tests
157-
cargo llvm-cov --workspace --no-report --examples
158-
# Generate lcov for Codecov
156+
# Run unit tests and example tests
157+
cargo llvm-cov --workspace --no-report --tests --examples --all-features
158+
159+
# Build binaries and library with instrumentation for integration/FFI tests
160+
export RUSTFLAGS="-C instrument-coverage"
161+
export LLVM_PROFILE_FILE="coverage-%p-%m.profraw"
162+
163+
# Build and run C FFI Example
164+
make -C examples/c_ffi_example
165+
./examples/c_ffi_example/out/mqtt_c_example || true
166+
167+
# Build and run integration tests (Proxy binaries)
168+
cargo build --workspace --bins --all-features
169+
cd mqtt_grpc_duality && ./run_integration_tests.sh --mqtt-ver=both && cd ..
170+
171+
# Generate the unified report
159172
cargo llvm-cov report --lcov --output-path lcov.info
160173
161174
- name: Upload coverage to Codecov
@@ -164,6 +177,7 @@ jobs:
164177
files: lcov.info
165178
fail_ci_if_error: false
166179
token: ${{ secrets.CODECOV_TOKEN }}
180+
verbose: true
167181

168182
benchmarks:
169183
name: Performance Benchmarks

0 commit comments

Comments
 (0)