From b23080d4de4340bb60c978a2e246656d0b394694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9o=20Rebert?= Date: Thu, 13 Jan 2022 17:52:06 +0100 Subject: [PATCH] Add crates.io badge and coverage badge --- .github/workflows/rust.yml | 27 ++++++++++++++++++++++----- README.md | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 52bd3a4..2100a6e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,9 +18,26 @@ jobs: - uses: actions/checkout@v2 - name: Build run: cargo build --verbose --all-features - - name: Run tests - run: cargo test --verbose --all-features - - name: Codecov - uses: codecov/codecov-action@v2.1.0 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 with: - token: ${{ secrets.CODECOV_TOKEN }} + toolchain: stable + override: true + + - name: Run cargo-tarpaulin + uses: actions-rs/tarpaulin@v0.1 + with: + version: '0.15.0' + args: '-- --verbose --all-features --test-threads 1' + + - name: Upload to codecov.io + uses: codecov/codecov-action@v2 + with: + token: ${{secrets.CODECOV_TOKEN}} + + - name: Archive code coverage results + uses: actions/upload-artifact@v1 + with: + name: code-coverage-report + path: cobertura.xml \ No newline at end of file diff --git a/README.md b/README.md index 315c694..e7e351d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # totp-rs -![Build Status](https://github.com/constantoine/totp-rs/workflows/Rust/badge.svg) [![docs](https://docs.rs/totp-rs/badge.svg)](https://docs.rs/totp-rs) +![Build Status](https://github.com/constantoine/totp-rs/workflows/Rust/badge.svg) [![docs](https://docs.rs/totp-rs/badge.svg)](https://docs.rs/totp-rs) [![](https://img.shields.io/crates/v/totp-rs.svg)](https://crates.io/crates/totp-rs) [![codecov](https://codecov.io/gh/constantoine/totp-rs/branch/master/graph/badge.svg?token=Q50RAIFVWZ)](https://codecov.io/gh/constantoine/totp-rs) This library permits the creation of 2FA authentification tokens per TOTP, the verification of said tokens, with configurable time skew, validity time of each token, algorithm and number of digits! Default features are kept as lightweight as possible to ensure small binaries and short compilation time