Trying out clippy and rustfmt CI-integrations.

This commit is contained in:
Jordan Petridis 2017-10-10 15:50:31 +03:00
parent 920fda13f0
commit c8b6d3faa8
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 29 additions and 7 deletions

View File

@ -17,8 +17,8 @@ test:stable:
script: script:
- rustc --version && cargo --version # Print version info for debugging - rustc --version && cargo --version # Print version info for debugging
- cargo build --all - cargo build --all
# - cargo test --all --verbose --jobs 1
- cargo test --all --verbose - cargo test --all --verbose
# - cargo test --all --verbose --jobs 1
# Use cargo to test the project # Use cargo to test the project
test:nightly: test:nightly:
@ -27,8 +27,30 @@ test:nightly:
image: "rustlang/rust:nightly" image: "rustlang/rust:nightly"
script: script:
- rustc --version && cargo --version # Print version info for debugging - rustc --version && cargo --version # Print version info for debugging
- cargo build - cargo build --all
- cargo test --verbose - cargo test --all --verbose
# - cargo test --verbose --jobs 1 # - cargo test --verbose --jobs 1
# - cargo bench # - cargo bench
allow_failure: true allow_failure: true
# Configure and run rustfmt on nightly
# Exits and builds fails if on bad format
test:rustfmt:
image: "rustlang/rust:nightly"
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install rustfmt
script:
- rustc --version && cargo --version
- cargo fmt --all -- --write-mode=diff
# Configure and run clippy on nightly
test:clippy:
image: "rustlang/rust:nightly"
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install clippy
script:
- rustc --version && cargo --version
- cargo clippy
allow_failure: true