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