From eace44f7d563336be99c07f389e3fc2bd5479504 Mon Sep 17 00:00:00 2001 From: micbou Date: Tue, 9 Aug 2016 16:01:18 +0200 Subject: [PATCH] Disable flake8 for Python 2.6 on Travis Since version 3.0.0, flake8 does not support Python 2.6, 3.2 and 3.3 anymore. It is still working for our Python 3.3 runs on Travis but not for the Python 2.6 one so we only disable it for this version. --- .travis.yml | 12 +++++++----- ci/travis/travis_script.sh | 7 +++++++ 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100755 ci/travis/travis_script.sh diff --git a/.travis.yml b/.travis.yml index 34df1b2f..0f6ae99b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,16 +8,18 @@ before_install: install: # source because it sets up env vars on some platforms - source ci/travis/travis_install.sh -script: ./run_tests.py +script: + - ci/travis/travis_script.sh env: matrix: - - YCM_PYTHON_VERSION=2.7 - - YCM_PYTHON_VERSION=2.6 - - YCM_PYTHON_VERSION=3.3 + - YCM_PYTHON_VERSION=2.7 YCM_FLAKE8=true + # Since 3.0.4, Flake8 is not working anymore on Python 2.6. + - YCM_PYTHON_VERSION=2.6 YCM_FLAKE8=false + - YCM_PYTHON_VERSION=3.3 YCM_FLAKE8=true matrix: exclude: - os: osx - env: YCM_PYTHON_VERSION=2.6 + env: YCM_PYTHON_VERSION=2.6 YCM_FLAKE8=false addons: apt: sources: diff --git a/ci/travis/travis_script.sh b/ci/travis/travis_script.sh new file mode 100755 index 00000000..94409e02 --- /dev/null +++ b/ci/travis/travis_script.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ "${YCM_FLAKE8}" = true ]; then + ./run_tests.py +else + ./run_tests.py --no-flake8 +fi