From a6f65f958630ab584056a8bf4eb0242b9d58677b Mon Sep 17 00:00:00 2001 From: David Brown Date: Sun, 26 Jan 2020 15:07:11 -0800 Subject: [PATCH] Add Ansible to Setup Travis (#55) Travis CI should use ansible to configure the services required to test the uploader library. Signed-off-by: David Brown --- .travis.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ae6d96..a6df9b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,17 @@ dist: bionic language: python -services: - - postgresql - - rabbitmq python: 3.6 -addons: - apt: - packages: - - rabbitmq-server stages: - lint - test - deploy -env: - POSTGRES_ENV_POSTGRES_USER: postgres - POSTGRES_ENV_POSTGRES_PASSWORD: - NOTIFICATIONS_DISABLED: 'True' cache: pip -before_install: -- pip install --upgrade pip setuptools wheel -- bash -xe travis/before-install.sh install: - pip install -r requirements-dev.txt +before_script: +- pip install ansible +- ansible-galaxy install pacifica.ansible_pacifica pacifica.ansible_travis +- ansible-playbook ~/.ansible/roles/pacifica.ansible_travis/molecule/common/playbook.yml -i ~/.ansible/roles/pacifica.ansible_travis/molecule/common/inventory.yml -e "ansible_python_interpreter=/home/travis/virtualenv/python${TRAVIS_PYTHON_VERSION}/bin/python travis_virtualenv=python${TRAVIS_PYTHON_VERSION} github_repository=cli" script: - pip install . - cd tests @@ -31,7 +21,7 @@ jobs: include: - language: python stage: lint - before_install: skip + before_script: skip script: - pre-commit run -a - radon cc pacifica @@ -41,7 +31,7 @@ jobs: - stage: deploy services: [] language: python - before_install: skip + before_script: skip script: skip python: 3.6 deploy: