]> git.lizzy.rs Git - rust.git/blob - .travis.yml
remove duplicate tests with float_cmp
[rust.git] / .travis.yml
1 language: rust
2
3 rust: nightly
4
5 os:
6   - linux
7   - osx
8
9 sudo: false
10
11 env:
12  global:
13    # TRAVIS_TOKEN_CLIPPY_SERVICE
14    - secure: dj8SwwuRGuzbo2wZq5z7qXIf7P3p7cbSGs1I3pvXQmB6a58gkLiRn/qBcIIegdt/nzXs+Z0Nug+DdesYVeUPxk1hIa/eeU8p6mpyTtZ+30H4QVgVzd0VCthB5F/NUiPVxTgpGpEgCM9/p72xMwTn7AAJfsGqk7AJ4FS5ZZKhqFI=
15    - RUST_BACKTRACE=1
16
17 install:
18   - . $HOME/.nvm/nvm.sh
19   - nvm install stable
20   - nvm use stable
21   - npm install remark-cli remark-lint
22
23 script:
24  - PATH=$PATH:./node_modules/.bin
25  - remark -f README.md > /dev/null
26  - set -e
27  - cargo build --features debugging
28  - cargo test --features debugging
29  - mkdir -p ~/rust/cargo/bin
30  - cp target/debug/cargo-clippy ~/rust/cargo/bin/cargo-clippy
31  - cp target/debug/clippy-driver ~/rust/cargo/bin/clippy-driver
32  - PATH=$PATH:~/rust/cargo/bin cargo clippy --all -- -D clippy
33  - cd clippy_workspace_tests && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ..
34  - cd clippy_workspace_tests/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
35  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../..
36  - cd clippy_workspace_tests/subcrate/src && PATH=$PATH:~/rust/cargo/bin cargo clippy -- -D clippy && cd ../../..
37  - PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=clippy_workspace_tests/Cargo.toml -- -D clippy
38  - cd clippy_workspace_tests/subcrate && PATH=$PATH:~/rust/cargo/bin cargo clippy --manifest-path=../Cargo.toml -- -D clippy && cd ../..
39  - set +e
40
41 after_success: |
42   #!/bin/bash
43   if [ $(uname) == Linux ]; then
44     ./.github/deploy.sh
45   # trigger rebuild of the clippy-service, to keep it up to date with clippy itself
46     set -e
47     if [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
48        [ "$TRAVIS_REPO_SLUG" == "Manishearth/rust-clippy" ] &&
49        [ "$TRAVIS_BRANCH" == "master" ] &&
50        [ "$TRAVIS_TOKEN_CLIPPY_SERVICE" != "" ] ; then
51        curl -s -X POST \
52           -H "Content-Type: application/json" \
53           -H "Accept: application/json" \
54           -H "Travis-API-Version: 3" \
55           -H "Authorization: token $TRAVIS_TOKEN_CLIPPY_SERVICE" \
56           -d "{ \"request\": { \"branch\":\"master\" }}" \
57           https://api.travis-ci.org/repo/gnunicorn%2Fclippy-service/requests
58     else
59       echo "Ignored"
60     fi
61     set +e
62   fi