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

127 lines
2.8 KiB
YAML
Raw Normal View History

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
RUST_LOG: info,gotham=debug,gotham_restful=trace
2019-10-14 01:15:12 +02:00
2020-01-20 23:51:27 +01:00
test-default:
2019-10-14 02:17:25 +02:00
stage: test
image: rust:1.49-slim
2019-10-14 01:15:12 +02:00
before_script:
- cargo -V
2019-09-26 17:34:31 +02:00
script:
- cargo test
2019-10-14 01:15:12 +02:00
cache:
key: cargo-1-49-default
2019-10-14 01:15:12 +02:00
paths:
- cargo/
- target/
2019-10-14 00:59:02 +02:00
test-full:
2019-10-14 02:17:25 +02:00
stage: test
image: rust:1.49-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:
- cargo test --no-default-features --features full
2020-11-21 14:47:29 +00:00
cache:
key: cargo-1-49-all
2020-11-21 14:47:29 +00:00
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:
2021-01-15 15:16:09 +01:00
- cargo tarpaulin --target-dir target/tarpaulin --no-default-features --features full --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
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.50-slim
2020-11-21 14:47:29 +00:00
before_script:
- apt update -y
- apt install -y --no-install-recommends libpq-dev
- cargo -V
script:
- cargo test --no-default-features --features full --tests -- --ignored
2020-11-21 14:47:29 +00:00
cache:
key: cargo-1-50-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
2021-02-17 04:02:54 +01:00
image: ghcr.io/msrd0/cargo-readme
before_script:
- cargo readme -V
2019-10-14 00:59:02 +02:00
script:
2021-02-17 04:02:54 +01:00
- cargo readme -t README.tpl -o 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:
name: alpine:3.13
2020-11-23 00:02:16 +01:00
before_script:
- apk add rustup
- rustup-init -qy --default-host x86_64-unknown-linux-musl --default-toolchain none </dev/null
- source $CARGO_HOME/env
- rustup toolchain install nightly --profile minimal --component rustfmt
2020-11-23 00:02:16 +01:00
- cargo -V
- cargo fmt --version
script:
- cargo fmt -- --check
- ./tests/ui/rustfmt.sh --check
2020-11-23 00:02:16 +01:00
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:
2021-01-15 17:33:40 +01:00
- cargo doc --no-default-features --features full
2020-05-06 15:58:11 +02:00
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
- 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