diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46f82d65..55ddd396 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,21 @@ jobs: run: cargo test --tests --lib --verbose -- --show-output --nocapture - name: Run doctests run: cargo test --package rencfs --doc --verbose -- --show-output --nocapture + - name: kcov + run: | + wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz && + tar xzf master.tar.gz && + cd kcov-master && + mkdir build && + cd build && + cmake .. && + make && + make install DESTDIR=../../kcov-build && + cd ../.. && + rm -rf kcov-master && + for file in target/debug/examplerust-*; do [ -x "${file}" ] || continue; mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; done && + bash <(curl -s https://codecov.io/bash) && + echo "Uploaded code coverage" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: