1
0
mirror of https://gitlab.com/xmpp-rs/xmpp-rs.git synced 2024-07-03 20:00:36 +02:00
xmpp-rs/.gitlab-ci.yml
Maxime “pep” Buquet f41b6bfd32
Use stable rustfmt
And install it as the container doesn't have it. Fortunately it's rather
quick (few seconds).

The previous nightly container apparently dropped rustfmt, which is
understandable as not all tools are available all the time. That's on
us.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-03-26 18:09:59 +01:00

54 lines
790 B
YAML

stages:
- lint
- build
- test
variables:
FEATURES: ""
RUST_BACKTRACE: "full"
.stable:
image: rust:latest
.nightly:
image: rustlang/rust:nightly
allow_failure: true # It's not often, but it happens nightly breaks, surprisingly.
.build:
stage: build
script:
- cargo build --verbose
.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
rust-latest-build:
extends:
- .build
- .stable
rust-nightly-build:
extends:
- .build
- .nightly
rust-latest-test:
extends:
- .test
- .stable
rust-nightly-test:
extends:
- .test
- .nightly