stages:
- build
- test
- deploy
job_build:
stage: build
script:
- make lint
tags:
- rust
job_test:
stage: test
script:
- make test
- export PATH=$PATH:~/.cargo/bin
- cargo kcov --all
- COVERAGE=$(grep -Po '(?<="covered":")\d+(?:\.\d+)?(?=")' target/cov/index.js)
# Tips: use '^Coverage:\s+(\d+(?:\.\d+)?)' on gitlab to capture the result
- echo "Coverage:" ${COVERAGE}
tags:
- rust