diff --git a/.github/workflows/toolchain.yml b/.github/workflows/toolchain.yml index 8861d6e..64323b3 100644 --- a/.github/workflows/toolchain.yml +++ b/.github/workflows/toolchain.yml @@ -93,29 +93,30 @@ jobs: profile: minimal toolchain: nightly override: true + components: llvm-tools-preview - uses: actions-rs/cargo@v1 with: - command: test - args: -- --test-threads=1 + command: install + args: cargo-binutils rustfilt + - name: Build tests + run: | + cargo rustc --message-format=json --tests -- -Zinstrument-coverage | jq -r '.executable | strings' > executables.txt + - name: Run tests + run: | + while read p; do + exec "$p" --test-threads=1 + done lcov.info - name: Upload coverage report uses: codecov/codecov-action@v1 with: - file: default.profdata fail_ci_if_error: true + - uses: actions/upload-artifact@v2 + with: + name: Upload coverage artifact + path: lcov.info diff --git a/README.md b/README.md index 2cadd11..1d3415f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![CI Status](https://github.com/Diggsey/ijson/workflows/CI/badge.svg)](https://github.com/Diggsey/ijson/actions?query=workflow%3ACI) [![Documentation](https://docs.rs/ijson/badge.svg)](https://docs.rs/ijson) [![crates.io](https://img.shields.io/crates/v/ijson.svg)](https://crates.io/crates/ijson) +[![codecov](https://codecov.io/gh/Diggsey/ijson/branch/master/graph/badge.svg?token=XZ1UCUKSYB)](https://codecov.io/gh/Diggsey/ijson) This crate offers a replacement for `serde-json`'s `Value` type, which is significantly more memory efficient.