13
13
global :
14
14
- RUST_BACKTRACE=1
15
15
- RUSTFLAGS="-D warnings"
16
- - PD_ADDR="127.0.0.1:2379"
17
- - TIKV_ADDR="127.0.0.1:2378"
18
16
19
17
install :
20
18
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then rustup component add rustfmt; fi
@@ -23,20 +21,16 @@ install:
23
21
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install cmake; fi
24
22
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then export PATH="$PATH:/c/Go/bin/:/c/Program Files/CMake/bin"; fi
25
23
26
-
27
- before_script :
24
+ script :
28
25
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then cargo fmt -- --check; fi
29
- # Currently some crates have lint errors if clippy checks them.
30
26
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then cargo clippy -- -D clippy::all; fi
31
-
32
- script :
33
27
- cargo test --all -- --nocapture
34
- # We need to switch the daemon of Windows to use Linux docker containers.
35
- - if [[ $TRAVIS_OS_NAME == "windows" ]]; then "/c/Program Files/Docker/Docker/DockerCli.exe" -SwitchDaemon .; fi
36
- # OS X can't do docker on travis. :(
37
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then docker run -d --net=host --name pd --rm pingcap/pd --name "pd" --data-dir "pd" --client-urls "http://127.0.0.1:2379" --advertise-client-urls "http://127.0.0.1:2379"; fi
38
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then docker run -d --net=host --name kv --rm --ulimit nofile=90000:90000 pingcap/tikv --pd-endpoints "127.0.0.1:2379" --addr "127.0.0.1:2378" --data-dir "kv"; fi
39
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then docker ps; fi
40
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then docker logs pd; fi
41
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then docker logs kv; fi
42
- - if [[ $TRAVIS_OS_NAME != "osx " ]]; then cargo test --all --features integration-tests -- --nocapture; fi
28
+ # For now we only run full integration tests on Linux. Here's why:
29
+ # * Docker on OS X is not supported by Travis.
30
+ # * Docker on Windows seems to not have the correct binary at `"/c/Program Files/Docker/Docker/DockerCli.exe" to switch it to Linux containers.
31
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then docker run -d --net=host --name pd --rm pingcap/pd --name "pd" --data-dir "pd" --client-urls "http://127.0.0.1:2379" --advertise-client-urls "http://127.0.0.1:2379"; fi
32
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then docker run -d --net=host --name kv --rm --ulimit nofile=90000:90000 pingcap/tikv --pd-endpoints "127.0.0.1:2379" --addr "127.0.0.1:2378" --data-dir "kv"; fi
33
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then docker ps; fi
34
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then docker logs pd; fi
35
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then docker logs kv; fi
36
+ - if [[ $TRAVIS_OS_NAME == "linux " ]]; then PD_ADDR="127.0.0.1:2379" cargo test --all --features integration-tests -- --nocapture; fi
0 commit comments