diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c94305881..c977fde7a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,6 +60,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: test run: cargo test --workspace --verbose --all-features -- --skip read_table_version_hdfs + ffi_test: runs-on: ${{ matrix.os }} strategy: @@ -117,3 +118,28 @@ jobs: cmake .. make make test + + coverage: + runs-on: ubuntu-latest + env: + CARGO_TERM_COLOR: always + steps: + - uses: actions/checkout@v4 + - name: Install rust + uses: actions-rs/toolchain@v1 + with: + profile: default + toolchain: stable + override: true + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - uses: Swatinem/rust-cache@v2 + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --codecov --output-path codecov.json -- --skip read_table_version_hdfs + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: codecov.json + fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index f370af1fc..818c544c1 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Some design principles which should be considered: ``` - The crate's documentation can be easily reviewed with: `cargo docs --open` +- Code coverage is available on codecov via [cargo-llvm-cov]. See their docs for instructions to install/run locally. [delta]: https://delta.io [delta-protocol]: https://github.com/delta-io/delta/blob/master/PROTOCOL.md @@ -116,3 +117,4 @@ Some design principles which should be considered: [dat]: https://github.com/delta-incubator/dat [derive-macros]: https://doc.rust-lang.org/reference/procedural-macros.html [API Docs]: https://docs.rs/delta_kernel/latest/delta_kernel/ +[cargo-llvm-cov]: https://github.com/taiki-e/cargo-llvm-cov \ No newline at end of file