Skip to content

Commit 1e91f37

Browse files
committed
Add code coverage
1 parent 02cbd8b commit 1e91f37

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/rust.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ jobs:
1818
- uses: actions/checkout@v3
1919
- name: Build
2020
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
2321
- name: Run doctests
2422
run: cargo test --doc --verbose
23+
24+
- uses: dtolnay/rust-toolchain@stable
25+
with:
26+
components: llvm-tools-preview
27+
- name: Install cargo-llvm-cov
28+
uses: taiki-e/install-action@cargo-llvm-cov
29+
- name: Install nextest
30+
uses: taiki-e/install-action@nextest
31+
- name: Generate code coverage
32+
run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
33+
- name: Upload coverage to Codecov
34+
uses: codecov/[email protected]
35+
with:
36+
token: ${{ secrets.CODECOV_TOKEN }}
37+
files: lcov.info
38+
fail_ci_if_error: true

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Sudoku Solver, take 2
22

3+
[![codecov](https://codecov.io/gh/sunsided/sudoku2-rs/graph/badge.svg?token=AZ7Q2JU140)](https://codecov.io/gh/sunsided/sudoku2-rs)
4+
35
Another take at Sudoku solving in Rust. This is a weekend-ish remake of my previous pet project
46
at [sunsided/rust-sudoku-solver](https://github.com/sunsided/rust-sudoku-solver).
57
Unlike the previous experiment, this solver correctly solves Hypersudokus and requires fewer branches.

0 commit comments

Comments
 (0)