]> git.lizzy.rs Git - rust.git/blobdiff - .travis.yml
Fix index out of bound in case of empty snippet
[rust.git] / .travis.yml
index ba8fad5f317710a2c60d8b0f7f2513e6acc38deb..9c1d004d6943eb3a6cc27251dc1a2a5d3efeea28 100644 (file)
@@ -17,6 +17,7 @@ branches:
 env:
  global:
    - RUST_BACKTRACE=1
+   - secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
 
 install:
   - |
@@ -55,8 +56,8 @@ matrix:
       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
     - env: INTEGRATION=rust-lang-nursery/chalk
       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
-    - env: INTEGRATION=rust-lang/rls
-      if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
+    - env: INTEGRATION=rust-lang/rls
+      if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
     - env: INTEGRATION=Geal/nom
       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
     - env: INTEGRATION=rust-lang/rustfmt
@@ -81,7 +82,10 @@ matrix:
       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
     - env: INTEGRATION=chronotope/chrono
       if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
-# prevent these jobs with default env vars
+  allow_failures:
+    - os: windows
+      env: CARGO_INCREMENTAL=0 BASE_TESTS=true OS_WINDOWS=true
+  # prevent these jobs with default env vars
   exclude:
     - os: linux
     - os: osx
@@ -90,9 +94,10 @@ matrix:
 script:
   - |
     if [ "$TRAVIS_BRANCH" == "auto" ] || [ "$TRAVIS_BRANCH" == "try" ]; then
-      output=$(curl -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$TRAVIS_PULL_REQUEST" | \
+      pr=$(echo $TRAVIS_COMMIT_MESSAGE | grep -o "#[0-9]*" | head -1 | sed 's/^#//g')
+      output=$(curl -H "Authorization: token $GITHUB_API_TOKEN" -s "https://api.github.com/repos/rust-lang/rust-clippy/pulls/$pr" | \
         python -c "import sys, json; print(json.load(sys.stdin)['body'])" | \
-        grep "changelog: " | \
+        grep "^changelog: " | \
         sed "s/changelog: //g")
       if [ -z "$output" ]; then
         echo "ERROR: PR body must contain 'changelog: ...'"