forked from Rust-related/RustPython
67 lines
1.9 KiB
YAML
67 lines
1.9 KiB
YAML
|
|
language: rust
|
|
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
|
|
script:
|
|
- cargo build --verbose --all
|
|
- cargo test --verbose --all
|
|
|
|
env:
|
|
# This is used to only capture the regular nightly test in allow_failures
|
|
- REGULAR_TEST=true
|
|
|
|
cache: cargo
|
|
|
|
matrix:
|
|
include:
|
|
# To test the snippets, we use Travis' Python environment (because
|
|
# installing rust ourselves is a lot easier than installing Python)
|
|
- language: python
|
|
python: 3.6
|
|
cache:
|
|
pip: true
|
|
# Because we're using the Python Travis environment, we can't use
|
|
# the built-in cargo cacher
|
|
directories:
|
|
- /home/travis/.cargo
|
|
- target
|
|
env:
|
|
- TRAVIS_RUST_VERSION=stable
|
|
- REGULAR_TEST=false
|
|
script: tests/.travis-runner.sh
|
|
- language: python
|
|
python: 3.6
|
|
cache:
|
|
pip: true
|
|
# Because we're using the Python Travis environment, we can't use
|
|
# the built-in cargo cacher
|
|
directories:
|
|
- /home/travis/.cargo
|
|
- target
|
|
env:
|
|
- TRAVIS_RUST_VERSION=beta
|
|
- REGULAR_TEST=false
|
|
script: tests/.travis-runner.sh
|
|
- name: rustfmt
|
|
language: rust
|
|
rust: nightly
|
|
cache: cargo
|
|
before_script:
|
|
- rustup component add rustfmt-preview
|
|
script:
|
|
# Code references the generated python.rs, so put something in
|
|
# place to make `cargo fmt` happy. (We use `echo` rather than
|
|
# `touch` because rustfmt complains about the empty file touch
|
|
# creates.)
|
|
- echo > parser/src/python.rs
|
|
- cargo fmt --all -- --check
|
|
env:
|
|
- REGULAR_TEST=false
|
|
allow_failures:
|
|
- rust: nightly
|
|
env: REGULAR_TEST=true
|