Skip to content

Commit

Permalink
Check formatting and clippy on CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk committed May 13, 2019
1 parent 51739de commit 7af7b4b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
language: rust
rust:
- 1.31.0
- stable
- beta
- nightly
matrix:
allow_failures:
- rust: nightly
before_script:
- rustup component add clippy
- rustup component add rustfmt
script: ci/script.sh
after_success:
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
cargo bench;
Expand Down
14 changes: 14 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -ex

cargo build
cargo test

# On Rust 1.31.0, we only care about passing tests.
if [ ! rustc --version | grep "^rustc 1.31.0" ]; then
cargo fmt --all -- --check
cargo clippy -- -D warnings
fi


0 comments on commit 7af7b4b

Please sign in to comment.