diff --git a/.coafile b/.coafile index 7d2def8e69..3a448a0615 100644 --- a/.coafile +++ b/.coafile @@ -134,6 +134,8 @@ ignore = node_modules/ [jinja2] bears = Jinja2Bear files = **.jj2 +check_end_labels = False +ignore = .moban.dt/core-travis.yml.jj2 [TODOS] enabled = False diff --git a/.misc/check_moban.sh b/.misc/check_moban.sh deleted file mode 100755 index 293ba7ccdb..0000000000 --- a/.misc/check_moban.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -ex - -: "${MOBAN_BRANCH:=master}" - -if [ ! -d ../coala-mobans ]; then - git clone https://gitlab.com/coala/mobans \ - --branch=${MOBAN_BRANCH} ../coala-mobans || exit 0 -fi - -date - -moban -git diff --exit-code diff --git a/.moban.yaml b/.moban.yaml index 32e381cf1d..7a1af32d99 100644 --- a/.moban.yaml +++ b/.moban.yaml @@ -18,12 +18,17 @@ docs_toc: false test_py36: true allow_generic_no_cover: true test_timeout: 60 +travis_sentinel: true python_versions: - 3.6 - 3.5 - 3.4.4 - 3.4.2 # 3.7 excluded due to https://github.com/coala/coala/issues/6028 and others +test_unsupported_python_versions: + - 2.7 + - 3.3 + - 3.4.1 entry_points: console_scripts: @@ -51,8 +56,11 @@ gitignore_extra_rulesets: - node requires: - - https://gitlab.com/coala/mobans.git + - type: git + url: https://gitlab.com/jayvdb/mobans + branch: custom-travis-template - https://github.com/NAStools/homeassistant.git + configuration: template_dir: - .moban.dt/ @@ -82,11 +90,11 @@ targets: - coalib/VERSION: VERSION.jj2 - runtime.txt: runtime.txt - netlify.toml: docs/netlify.toml + - .travis.yml: ci/coala-travis.yml.jj2 - .misc/appveyor.yml: ci/appveyor.yml.jj2 - .misc/run_with_env.cmd: run_with_env.cmd - .misc/check_unsupported.sh: ci/check_unsupported.sh.jj2 copy: - - .misc/check_moban.sh: ci/check_moban.sh - .misc/check_setuptools.py: ci/check_setuptools.py # homeassistant license MIT - coalib/misc/Asyncio.py: async.py diff --git a/.travis.yml b/.travis.yml index c90d782bcb..6686b58108 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ sudo: false +dist: xenial language: python +notifications: + email: false python: - - 3.4.4 - 3.5 - - 3.4.2 + - 3.4 stages: - name: sentinel @@ -14,19 +16,27 @@ stages: if: branch = master AND type = push .disable_global: &disable_global + addons: false + cache: false + env: {} + python: false before_install: false - install: true + install: false before_script: false + script: false after_success: false after_failure: false + before_deploy: false + deploy: false -.check_moban: &check_moban +.moban: &moban <<: *disable_global python: 3.6 stage: moban - install: pip install moban - script: .misc/check_moban.sh - if: branch != master OR type = pull_request + install: pip install moban>=0.0.4 + script: + - moban + - git diff --exit-code jobs: include: @@ -54,28 +64,32 @@ jobs: <<: *disable_global stage: unsupported script: .misc/check_unsupported.sh - - python: 3.6 - stage: moban - install: pip install moban - script: .misc/check_moban.sh + - stage: moban + <<: *moban if: branch = master AND type = push - - *check_moban + - *moban allow_failures: - - *check_moban + - *moban + +stage: test env: global: - PATH="$PATH:$TRAVIS_BUILD_DIR/node_modules/.bin" - BEARS_ZIP_URL=https://codeload.github.com/coala/coala-bears/zip + - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/" + - JDK="adopt@1.8.212-04" cache: pip: true directories: - node_modules - docs/_build + - ~/nltk_data + - ~/.jabba before_install: - - if [[ $TRAVIS_OS_NAME == osx ]]; then TRAVIS_PYTHON_VERSION=3.5; fi + - curl "${GRAVIS}.install-jdk-travis.sh" --output ~/.install-jdk-travis.sh - > if [[ $TRAVIS_OS_NAME == osx ]]; then @@ -84,12 +98,17 @@ before_install: sudo ln -sf $(which pip3) $(which pip 2>/dev/null || echo /usr/bin/pip) fi + # See rationale in .ci/deps.python-packages.ps1 for pre-installing these + - pip install --prefer-binary cffi lxml # Use pip 9, so that setuptools can be downgraded. # https://github.com/coala/coala/issues/4708 # Apart from builds with python 2.7 and 3.5, it installs setuptools # twice. So, it is required to uninstall one version manually. - pip uninstall setuptools --yes - - pip install pip==9.0.1 setuptools==21 + - pip uninstall setuptools --yes || true + - pip uninstall setuptools --yes || true + - pip uninstall pipenv --yes || true + - pip install pip==9.0.1 setuptools==21.2.2 - python .misc/check_setuptools.py # https://github.com/coala/coala/issues/3183 @@ -104,6 +123,7 @@ before_install: # For bears in .coafile requiring npm dependencies - npm install --no-save + - source ~/.install-jdk-travis.sh before_script: # Restore the original requirements.txt @@ -113,9 +133,9 @@ before_script: script: - py.test - python setup.py bdist_wheel - - pip install ./dist/coala-*.whl + - pip install ./dist/*.whl - curl -fsSL -o coala-bears.zip $BEARS_ZIP_URL/master - - pip install coala-bears.zip[alldeps] --pre -U + - pip install coala-bears.zip[alldeps] - coala --non-interactive - python setup.py docs - .ci/check_man.sh @@ -126,9 +146,6 @@ after_success: after_failure: - codecov -notifications: - email: false - branches: exclude: - /^sils\//