49 lines
735 B
YAML
49 lines
735 B
YAML
---
|
|
|
|
stages:
|
|
- lint
|
|
- test
|
|
|
|
variables:
|
|
FEATURES: ""
|
|
RUST_BACKTRACE: "full"
|
|
|
|
.show-version:
|
|
before_script:
|
|
- rustc --version
|
|
- cargo --version
|
|
|
|
.stable:
|
|
image: rust:latest
|
|
extends:
|
|
- .show-version
|
|
|
|
.nightly:
|
|
image: rustlang/rust:nightly
|
|
# It's not often, but it happens nightly breaks, surprisingly.
|
|
allow_failure: true
|
|
extends:
|
|
- .show-version
|
|
|
|
.test:
|
|
stage: test
|
|
script:
|
|
- cargo test --verbose
|
|
|
|
rustfmt:
|
|
stage: lint
|
|
script:
|
|
- rustup component add rustfmt
|
|
- find -type f -iname '*.rs' -not -path './target/*' | xargs rustfmt --check --edition 2018
|
|
extends:
|
|
- .stable
|
|
|
|
stable-test:
|
|
extends:
|
|
- .test
|
|
- .stable
|
|
|
|
nightly-test:
|
|
extends:
|
|
- .test
|
|
- .nightly
|