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 cache: key: cargo-1-42-default paths: - cargo/ - target/ test-full: 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 --no-default-features --features full 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 --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 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 --no-default-features --features full --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 --no-default-features --features full 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 '
The documentation is located here' >public/index.html artifacts: paths: - public only: - master