From 890ea4b6dd5431ae06bc0cb7590cfaa0c90f4a20 Mon Sep 17 00:00:00 2001 From: Kert Date: Sat, 17 Apr 2021 11:59:44 -0700 Subject: [PATCH] Adding code coverage (#8) * Adding Tarpaulin coverage * Add coveralls badge --- .github/workflows/coverage.yml | 18 ++++++++++++++++++ .github/workflows/pre-commit.yaml | 5 +---- README.md | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..35cd172 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,18 @@ +name: coverage + +on: [ push, pull_request ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Push to coveralls.io + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + run: | + cargo install cargo-tarpaulin + cargo tarpaulin --ciserver github-ci --coveralls $COVERALLS_REPO_TOKEN diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 8b16c07..f597b0f 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -1,9 +1,6 @@ name: pre-commit -on: - pull_request: - push: - branches: [master, devel] +on: [ push, pull_request ] jobs: pre-commit: diff --git a/README.md b/README.md index 06fa9e3..f27e977 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![documentation](https://docs.rs/fixed-bigint/badge.svg)](https://docs.rs/fixed-bigint/) [![minimum rustc 1.51](https://img.shields.io/badge/rustc-1.51+-red.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html) [![build status](https://github.com/kaidokert/fixed-bigint-rs/actions/workflows/rust.yml/badge.svg)](https://github.com/kaidokert/fixed-bigint-rs/actions) +[![Coverage Status](https://coveralls.io/repos/github/kaidokert/fixed-bigint-rs/badge.svg?branch=main)](https://coveralls.io/github/kaidokert/fixed-bigint-rs?branch=main) Unsigned BigInt implementation, backed by a fixed-size array.