Skip to content

Commit

Permalink
Merge pull request #287 from zachschuermann/coverage
Browse files Browse the repository at this point in the history
Add code coverage to CI
  • Loading branch information
zachschuermann authored Aug 6, 2024
2 parents 0a3834b + 4fe559d commit e0a2e5e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit e0a2e5e

Please sign in to comment.