~cyplo/genpass

b406970bd11284940050984732015aef0741d7db — Cyryl PÅ‚otnicki 2 years ago 269c610
add code coverage
3 files changed, 10 insertions(+), 5 deletions(-)

M .build.yml
M Cargo.lock
R scripts/{upload-coverage-data.sh => coverage.sh}
M .build.yml => .build.yml +7 -0
@@ 6,6 6,7 @@ secrets:
  - 6c23a8c1-7a30-4a7e-b3b7-0171e898a7d3
  - f7642e3d-3fa5-48da-affa-be2fa24da689
  - 996295b0-681c-49e8-8774-1be2f3e0bfe9
  - 376ee22c-23f8-4395-acb7-5b933833df4d

environment:
  CI: "true"


@@ 19,6 20,12 @@ tasks:
      nix-shell --pure --run "./scripts/test.sh"
      nix-shell --pure --run "./scripts/package.sh"

  - code_coverage: |
      set +xv
      cd genpass
      CODECOV_TOKEN=`cat ~/.codecov_token_genpass`
      nix-shell --pure --run "./scripts/coverage.sh"

  - publish_crate: |
      set +xv
      cd genpass

M Cargo.lock => Cargo.lock +1 -1
@@ 324,7 324,7 @@ checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"

[[package]]
name = "genpass"
version = "0.5.7"
version = "0.5.9"
dependencies = [
 "assert_cmd",
 "bitflags",

R scripts/upload-coverage-data.sh => scripts/coverage.sh +2 -4
@@ 1,7 1,5 @@
#!/usr/bin/env bash

set -e

if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then
    bash <(curl -s https://codecov.io/bash)
fi
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash)