pathtracer/.gitlab-ci.yml
Bruno BELANYI 5d03df960c project: use non-nightly image by default in CI
Only use the nightly features for `cargo fmt`. This avoids having the CI
be red because `clippy` is not available for the nightly version that
was used to run it.
2020-03-16 16:36:13 +01:00

42 lines
716 B
YAML

# Official language image.
image: 'rust:latest'
stages:
- lint
- test
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
lint:fmt:
# Nightly image for formatting configuration
image: 'rustlang/rust:nightly'
stage: lint
before_script:
- rustup component add rustfmt
script:
- cargo fmt --version
- cargo fmt --all -- --check
lint:clippy:
stage: lint
before_script:
- rustup component add clippy
script:
- cargo clippy --version
- cargo clippy -- --deny warnings
test:cargo-test:
stage: test
script:
- rustc --version
- cargo --version
- cargo test --all --verbose
cache:
paths:
- apt/
- cargo/
- target/