diff --git a/.github/workflows/lip-0001.yaml b/.github/workflows/lip-0001.yaml index c6f8445..5e29f8f 100644 --- a/.github/workflows/lip-0001.yaml +++ b/.github/workflows/lip-0001.yaml @@ -15,10 +15,18 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.92.0 with: - components: rustfmt, clippy + components: rustfmt, clippy, llvm-tools-preview - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-llvm-cov - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - run: cargo fmt --all --check - run: cargo test --locked --workspace - run: cargo clippy --locked --workspace --all-targets -- -D warnings + - name: Coverage (fail below 100% lines) + run: cargo llvm-cov --locked --workspace --all-features --fail-under-lines 100 --ignore-filename-regex 'test_support.rs' --lcov --output-path target/lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: target/lcov.info + fail_ci_if_error: true - run: cargo run --locked -p lyra-catalog-cli -- --help diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..2cf08a6 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,10 @@ +coverage: + status: + project: + default: + target: 100 + threshold: 0 + patch: + default: + target: 100 + threshold: 0