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/*' --ignore-panics --ignore-tests --out Html -v artifacts: paths: - tarpaulin-report.html cache: 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 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 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 tarpaulin-report.html public/coverage.html - mv target/doc public - echo '
The documentation is located here' >public/index.html artifacts: paths: - public only: - master