2020-01-05 13:57:59 +00:00
|
|
|
dist: bionic
|
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
language: python
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
python:
|
2020-01-05 13:57:59 +00:00
|
|
|
- 3.7
|
|
|
|
- 3.8
|
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- lint
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
pip: true
|
|
|
|
cargo: true
|
|
|
|
|
|
|
|
before_cache:
|
|
|
|
- rm -rfv target/debug/incremental/{tantivy,build_script_build,common}-*
|
|
|
|
- rm -rfv target/debug/.fingerprint/tantivy-*
|
|
|
|
- rm -rfv target/debug/build/tantivy-*
|
|
|
|
- rm -rfv target/debug/deps/libtantivy-*
|
|
|
|
- rm -rfv target/debug/deps/tantivy-*
|
|
|
|
- rm -rfv target/debug/{tantivy,libtantivy}.d
|
|
|
|
- cargo clean -p tantivy-py
|
2019-08-08 12:22:35 +00:00
|
|
|
|
2019-08-08 13:14:45 +00:00
|
|
|
env:
|
2020-01-05 13:57:59 +00:00
|
|
|
global:
|
|
|
|
- PIPENV_VERBOSITY=-1
|
|
|
|
- TRAVIS_RUST_VERSION=nightly
|
|
|
|
- RUST_BACKTRACE=1
|
|
|
|
|
|
|
|
install:
|
|
|
|
- pip install --upgrade pip
|
|
|
|
- pip install -U pipenv
|
|
|
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
|
|
|
|
- source "$HOME"/.cargo/env
|
|
|
|
- pipenv install --dev .
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- rustc --version
|
|
|
|
- python --version
|
2019-08-08 13:14:45 +00:00
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2020-01-05 13:57:59 +00:00
|
|
|
- python: 3.7
|
2019-08-08 12:22:35 +00:00
|
|
|
name: 'rust linters'
|
|
|
|
install: rustup component add clippy rustfmt
|
|
|
|
script:
|
|
|
|
- cargo clippy
|
|
|
|
- cargo fmt -- --check
|
|
|
|
stage: lint
|
|
|
|
|
2020-01-05 13:57:59 +00:00
|
|
|
script:
|
|
|
|
- pipenv run py.test -rws -v tests/
|