First attempt to run snippet tests in Travis
@@ -8,3 +8,29 @@ rust:
script:
- cargo build --verbose --all
- cargo test --verbose --all
+
+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
+ before_script:
+ - curl -sSf https://build.travis-ci.org/files/rustup-init.sh | sh -s -- --default-toolchain=stable -y
+ - export PATH=$HOME/.cargo/bin:$PATH
+ install:
+ - pip install pipenv
+ - (cd tests; pipenv install)
+ script:
+ # Build outside of the test runner
+ - cargo build --verbose --release
+ - (cd tests; pipenv run pytest)
