From a4708a68de918659c5dc0e18172a21f375567269 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Mon, 26 Oct 2020 17:58:28 -0500 Subject: [PATCH] CI: use circleci Travis cut to half the number of builds for open source projects, this is slower builds. We are already paying for circleci. --- .circleci/config.yml | 73 ++++++++++++++++++++++ .travis.yml | 52 --------------- scripts/{travis => circle}/install_node.sh | 0 scripts/travis/install_elasticsearch.sh | 7 --- tox.ini | 4 -- 5 files changed, 73 insertions(+), 63 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 .travis.yml rename scripts/{travis => circle}/install_node.sh (100%) delete mode 100755 scripts/travis/install_elasticsearch.sh diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..586e417c9c7 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,73 @@ +version: 2.1 + +default: &default + steps: + - checkout + - run: git submodule sync + - run: git submodule update --init + - run: pip install --user tox + - run: scripts/circle/install_node.sh + - run: + name: Add node to the path + command: | + echo 'export PATH=~/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH' >> $BASH_ENV + source $BASH_ENV + - run: tox + +jobs: + tests: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: py36,codecov + TOX_POSARGS: '' + - image: 'docker.elastic.co/elasticsearch/elasticsearch:6.8.12' + name: search + + lint: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: lint + + migrations: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: migrations + + docs: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: docs + + docs-lint: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: docs-lint + + eslint: + <<: *default + docker: + - image: 'cimg/python:3.6' + environment: + TOXENV: eslint + NODE_VERSION: 10.17.0 + +workflows: + version: 2 + test: + jobs: + - lint + - migrations + - docs + - docs-lint + - eslint + - tests diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a100c9ceace..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -language: python -python: - - 3.6 -dist: xenial - -addons: - hosts: - - search - -jobs: - include: - - python: 3.6 - env: TOXENV=py36,codecov TOX_POSARGS='' ES_VERSION=6.8.12 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz - - python: 3.6 - env: TOXENV=docs - - python: 3.6 - env: TOXENV=docs-linkcheck - - python: 3.6 - env: TOXENV=docs-lint - - python: 3.6 - env: TOXENV=lint - script: tox - - python: 3.6 - env: TOXENV=eslint NODE_VERSION=10.17.0 - - python: 3.6 - env: TOXENV=migrations - - allow_failures: - - env: TOXENV=docs-linkcheck -cache: - directories: - - ~/.cache/pip - - ~/.nvm/nvm.sh - - ~/.npm -install: - - ./scripts/travis/install_elasticsearch.sh - - ./scripts/travis/install_node.sh - - pip install tox-travis -script: - - tox -notifications: - slack: - rooms: - - readthedocs:y3hjODOi7EIz1JAbD1Zb41sz#random - on_success: change - on_failure: always - -branches: - only: - - master - - rel # Community release branch - - relcorp # Corporate release branch diff --git a/scripts/travis/install_node.sh b/scripts/circle/install_node.sh similarity index 100% rename from scripts/travis/install_node.sh rename to scripts/circle/install_node.sh diff --git a/scripts/travis/install_elasticsearch.sh b/scripts/travis/install_elasticsearch.sh deleted file mode 100755 index b67a6d15188..00000000000 --- a/scripts/travis/install_elasticsearch.sh +++ /dev/null @@ -1,7 +0,0 @@ -if [ $ES_DOWNLOAD_URL ] -then - wget ${ES_DOWNLOAD_URL} - tar -xzf elasticsearch-${ES_VERSION}.tar.gz - ./elasticsearch-${ES_VERSION}/bin/elasticsearch-plugin install analysis-icu - ./elasticsearch-${ES_VERSION}/bin/elasticsearch -d -fi diff --git a/tox.ini b/tox.ini index 8227f163ade..239aec5625c 100644 --- a/tox.ini +++ b/tox.ini @@ -3,10 +3,6 @@ minversion=2.9.0 envlist = py36,lint,docs skipsdist = True -[travis] -python = - 3.6: py36, codecov - [testenv] description = run test suite for the application with {basepython} setenv =