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