61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
language: rust
|
|
rust:
|
|
- 1.26.0
|
|
- 1.27.0
|
|
- 1.28.0
|
|
- 1.31.0
|
|
- 1.32.0
|
|
- 1.33.0
|
|
- 1.34.0
|
|
- 1.35.0
|
|
- 1.36.0
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
matrix:
|
|
allow_failures:
|
|
- rust: nightly
|
|
include:
|
|
# Rustfmt
|
|
- env: RUSTFMT_VERSION="0.99.5"
|
|
rust: nightly-2018-09-26
|
|
install:
|
|
- rustup component add rustfmt-preview
|
|
- cargo install rustfmt-nightly --force --version $RUSTFMT_VERSION || echo "rustfmt already installed"
|
|
before_script:
|
|
- cargo-fmt fmt -- --version
|
|
script:
|
|
- cargo fmt
|
|
|
|
# Clippy
|
|
- env: CLIPPY_VERSION="0.0.212"
|
|
rust: nightly
|
|
install:
|
|
- travis_wait cargo install clippy --version $CLIPPY_VERSION || echo "clippy already installed"
|
|
script:
|
|
# Fail if clippy output contains "error:" or "warning:"
|
|
- cargo clippy 2>&1 | tee ./clippy.out && ! grep -qe "error:\|warning:" ./clippy.out
|
|
|
|
# Test coverage (with Tarpaulin)
|
|
- env: TARPAULIN_VERSION="0.6.10"
|
|
rust: stable
|
|
# To avoid "Error: EPERM: operation not permitted" error (see https://github.com/valery-barysok/session-file-store/issues/58)
|
|
sudo: true
|
|
install:
|
|
- curl -sL https://github.com/xd009642/tarpaulin/releases/download/$TARPAULIN_VERSION/cargo-tarpaulin-$TARPAULIN_VERSION-travis.tar.gz | tar xvz -C $HOME/.cargo/bin
|
|
script:
|
|
- cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
|
|
|
|
script:
|
|
- cargo test
|
|
cache:
|
|
cargo: true
|
|
before_cache:
|
|
# Travis can't cache files that are not readable by "others"
|
|
- chmod -R a+r $HOME/.cargo
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libssl-dev # Required for tarpaulin
|