2019-09-26 17:34:31 +02:00
|
|
|
|
|
|
|
stages:
|
2019-10-14 02:17:25 +02:00
|
|
|
- test
|
2020-05-06 15:58:11 +02:00
|
|
|
- build
|
2019-10-20 17:42:58 +02:00
|
|
|
- publish
|
2019-09-26 17:34:31 +02:00
|
|
|
|
2019-10-14 01:15:12 +02:00
|
|
|
variables:
|
|
|
|
CARGO_HOME: $CI_PROJECT_DIR/cargo
|
|
|
|
|
2020-01-20 23:51:27 +01:00
|
|
|
test-default:
|
2019-10-14 02:17:25 +02:00
|
|
|
stage: test
|
2020-11-21 14:47:29 +00:00
|
|
|
image: rust:1.42-slim
|
2019-10-14 01:15:12 +02:00
|
|
|
before_script:
|
|
|
|
- cargo -V
|
2019-09-26 17:34:31 +02:00
|
|
|
script:
|
2020-11-21 14:47:29 +00:00
|
|
|
- cargo test --workspace
|
2019-10-14 01:15:12 +02:00
|
|
|
cache:
|
2020-11-21 14:47:29 +00:00
|
|
|
key: cargo-1-42-default
|
2019-10-14 01:15:12 +02:00
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
2019-10-14 00:59:02 +02:00
|
|
|
|
2019-10-14 02:17:25 +02:00
|
|
|
test-all:
|
|
|
|
stage: test
|
2020-11-21 14:47:29 +00:00
|
|
|
image: rust:1.42-slim
|
2019-10-14 01:15:12 +02:00
|
|
|
before_script:
|
2020-11-21 14:47:29 +00:00
|
|
|
- apt update -y
|
|
|
|
- apt install -y --no-install-recommends libpq-dev
|
2019-10-14 01:15:12 +02:00
|
|
|
- cargo -V
|
2019-10-14 00:59:02 +02:00
|
|
|
script:
|
2020-11-21 14:47:29 +00:00
|
|
|
- cargo test --workspace --all-features
|
|
|
|
cache:
|
|
|
|
key: cargo-1-42-all
|
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
|
|
|
|
|
|
|
test-tarpaulin:
|
|
|
|
stage: test
|
|
|
|
image: rust:slim
|
|
|
|
before_script:
|
|
|
|
- apt update -y
|
|
|
|
- apt install -y --no-install-recommends libpq-dev libssl-dev pkgconf
|
|
|
|
- cargo -V
|
|
|
|
- cargo install cargo-tarpaulin
|
|
|
|
script:
|
2020-11-22 22:31:51 +01:00
|
|
|
- cargo tarpaulin --target-dir target/tarpaulin --all --all-features --exclude-files 'cargo/*' --exclude-files 'derive/*' --exclude-files 'example/*' --exclude-files 'target/*' --ignore-panics --ignore-tests --out Html --out Xml -v
|
2020-04-12 22:30:17 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tarpaulin-report.html
|
2020-11-22 22:31:51 +01:00
|
|
|
reports:
|
|
|
|
cobertura: cobertura.xml
|
2019-10-14 01:15:12 +02:00
|
|
|
cache:
|
2020-11-21 14:47:29 +00:00
|
|
|
key: cargo-stable-all
|
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
|
|
|
|
|
|
|
test-trybuild-ui:
|
|
|
|
stage: test
|
|
|
|
image: rust:1.48-slim
|
|
|
|
before_script:
|
|
|
|
- apt update -y
|
|
|
|
- apt install -y --no-install-recommends libpq-dev
|
|
|
|
- cargo -V
|
|
|
|
script:
|
|
|
|
- cargo test --workspace --all-features --tests -- --ignored
|
|
|
|
cache:
|
|
|
|
key: cargo-1-48-all
|
2019-10-14 01:15:12 +02:00
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
2019-10-14 00:59:02 +02:00
|
|
|
|
|
|
|
readme:
|
2019-10-14 02:17:25 +02:00
|
|
|
stage: test
|
2020-02-11 18:56:47 +01:00
|
|
|
image: msrd0/cargo-readme
|
2019-10-14 00:59:02 +02:00
|
|
|
script:
|
2020-05-05 23:18:05 +02:00
|
|
|
- cargo readme -t README.tpl >README.md.new
|
2019-10-14 00:59:02 +02:00
|
|
|
- diff README.md README.md.new
|
2019-10-20 17:42:33 +02:00
|
|
|
|
2020-11-23 00:02:16 +01:00
|
|
|
rustfmt:
|
|
|
|
stage: test
|
|
|
|
image: rustlang/rust:nightly-slim
|
|
|
|
before_script:
|
|
|
|
- cargo -V
|
|
|
|
- cargo fmt --version
|
|
|
|
script:
|
|
|
|
- cargo fmt -- --check
|
|
|
|
|
2020-05-06 15:58:11 +02:00
|
|
|
doc:
|
|
|
|
stage: build
|
2020-11-21 14:47:29 +00:00
|
|
|
image: rust:slim
|
2020-05-06 15:58:11 +02:00
|
|
|
before_script:
|
|
|
|
- cargo -V
|
|
|
|
script:
|
|
|
|
- cargo doc --all-features
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- target/doc/
|
|
|
|
cache:
|
2020-11-21 14:47:29 +00:00
|
|
|
key: cargo-stable-doc
|
2020-05-06 15:58:11 +02:00
|
|
|
paths:
|
|
|
|
- cargo/
|
|
|
|
- target/
|
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: publish
|
|
|
|
image: busybox
|
|
|
|
script:
|
2020-11-21 14:47:29 +00:00
|
|
|
- mv target/doc public
|
2020-11-22 22:31:51 +01:00
|
|
|
- mv tarpaulin-report.html public/coverage.html
|
2020-11-21 14:47:29 +00:00
|
|
|
- echo '<!DOCTYPE HTML><html><head><meta http-equiv="Refresh" content="0; url=./gotham_restful/index.html"/></head><body>The documentation is located <a href="./gotham_restful/index.html">here</a></body></html>' >public/index.html
|
2020-05-06 15:58:11 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
only:
|
|
|
|
- master
|