diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f558e4c053f5e5dad3dae317b9c2d1499ef61811..f7bce5f9673d5813593463749318481df5812074 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: pull_request: branches: [main] -env: +env: CARGO_TERM_COLOR: always RUSTFLAGS: "-Dwarnings" @@ -21,7 +21,7 @@ jobs: - nightly steps: - uses: actions/checkout@v3 - + - name: Init nigthly install for fmt run: rustup update nightly && rustup default nightly && rustup component add rustfmt @@ -30,7 +30,7 @@ jobs: - name: Init install run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} && rustup component add clippy - + - name: Clippy run: cargo clippy --all-targets --all-features @@ -38,4 +38,20 @@ jobs: run: cargo build - name: Tests - run: cargo test \ No newline at end of file + run: cargo test + + - name: Install latest nextest release + uses: taiki-e/install-action@nextest + + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + + - name: Collect coverage data + run: cargo llvm-cov nextest --lcov --output-path lcov.info + + - name: Report code coverage + uses: Nef10/lcov-reporter-action@v0.4.0 + with: + lcov-file: lcov.info + pr-number: ${{ env.pr_number }} + if: github.event_name == 'pull_request'