num-decimal 0.2.2

Infinite precision decimals with fair rounding and other gimmicks based on num-rational.
Documentation
# The documentation for the contents of this file can be found at:
# https://docs.gitlab.com/ce/ci/yaml/README.html

# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/rust/tags/
# The recipe for this docker image can be found at:
# https://github.com/rust-lang/docker-rust/blob/deb612dd257e15f2bfe877fd3253b2b1b7c261df/1.43.0/buster/Dockerfile
image: "rust:1.43.0"

stages:
  - build
  - test

build:cargo:
  stage: build
  artifacts:
    paths:
      - target/
  script:
  - rustc --version && cargo --version
  - cargo build --tests --all --verbose

test:cargo:
  stage: test
  dependencies:
  - build:cargo
  script:
  - cargo test --all --verbose

lint:clippy:
  stage: test
  dependencies:
    - build:cargo
  script:
  - rustup component add clippy
  - cargo clippy --all-targets --all-features -- -D warnings

coverage:kcov:
  stage: test
  dependencies:
    - build:cargo
  artifacts:
    paths:
    - kcov/
  coverage: '/^Coverage+:\s(\d+(?:\.\d+)?)/'
  script:
  - echo 'deb http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
  - echo 'deb-src http://deb.debian.org/debian testing main' >> /etc/apt/sources.list
  - apt-get update
  - apt-get install --assume-yes kcov
  - files=$(find target/debug -maxdepth 1 -type f -executable -iname "*-????????????????");
    covs="";
    for file in ${files}; do
      cov="kcov-$(basename ${file})";
      kcov --exclude-pattern=/usr/ --verify "${cov}" "${file}";
      covs+=" ${cov}";
    done;
    kcov --merge kcov/ ${covs};
    COVERAGE=$(grep --only-matching 'covered":"[^"]\+"' kcov/index.js | awk -F'"' '{print $3}');
    echo "Coverage:" ${COVERAGE};