You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
532 B
35 lines
532 B
5 years ago
|
image: rascul3/rust:latest
|
||
|
|
||
|
build:
|
||
|
stage: build
|
||
|
script:
|
||
|
- cargo build
|
||
|
|
||
|
test:
|
||
|
stage: test
|
||
|
script:
|
||
|
- cargo test
|
||
|
|
||
|
cov:
|
||
|
stage: test
|
||
|
coverage: '/^Coverage+:\s(\d+(?:\.\d+)?)/'
|
||
|
script:
|
||
|
- cargo build
|
||
|
- cargo kcov
|
||
|
- COVERAGE=$(grep -Po 'covered":.*?[^\\]"' target/cov/index.json | grep "[0-9]*\.[0-9]" -o)
|
||
|
- echo "Coverage:" $COVERAGE
|
||
|
- mv target/cov public/
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- public
|
||
|
|
||
|
pages:
|
||
|
stage: deploy
|
||
|
script:
|
||
|
- mv index.html public/
|
||
|
artifacts:
|
||
|
paths:
|
||
|
- public
|
||
|
only:
|
||
|
- master
|