1
0
Fork 0
mirror of https://gitlab.com/msrd0/gotham-restful.git synced 2025-02-22 20:52:27 +00:00
deprecated-gotham-restful/.gitlab-ci.yml

117 lines
2.4 KiB
YAML

stages:
- test
- build
- publish
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
test-default:
stage: test
image: rust:1.42-slim
before_script:
- cargo -V
script:
- cargo test --workspace
cache:
key: cargo-1-42-default
paths:
- cargo/
- target/
test-all:
stage: test
image: rust:1.42-slim
before_script:
- apt update -y
- apt install -y --no-install-recommends libpq-dev
- cargo -V
script:
- 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:
- 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
artifacts:
paths:
- tarpaulin-report.html
reports:
cobertura: cobertura.xml
cache:
key: cargo-stable-all
paths:
- cargo/
- target/
test-trybuild-ui:
stage: test
image: rust:1.49-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
paths:
- cargo/
- target/
readme:
stage: test
image: msrd0/cargo-readme
script:
- cargo readme -t README.tpl >README.md.new
- diff README.md README.md.new
rustfmt:
stage: test
image: rustlang/rust:nightly-slim
before_script:
- cargo -V
- cargo fmt --version
script:
- cargo fmt -- --check
doc:
stage: build
image: rust:slim
before_script:
- cargo -V
script:
- cargo doc --all-features
artifacts:
paths:
- target/doc/
cache:
key: cargo-stable-doc
paths:
- cargo/
- target/
pages:
stage: publish
image: busybox
script:
- mv target/doc public
- mv tarpaulin-report.html public/coverage.html
- 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
artifacts:
paths:
- public
only:
- master