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