From 990fbcd66b9d52f371f01def28bb267a2dc141b1 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 27 Oct 2020 15:56:49 +0100 Subject: [PATCH] Update travis based on docs https://galaxy.ansible.com/docs/contributing/importing.html#import-roles-via-travis-ci --- .travis.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 274de81..4dc7895 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,28 @@ ---- -# OS Details -os: linux language: python -python: '3.8' +python: "3.8" -cache: - pip: true +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip -# Install ansible and ansible-lint install: + # Install ansible - pip install ansible - - pip install ansible-lint -# testing galaxy install and ansible lint -# more advanced testing is currently handled with -# github actions. The gh-actions for our test are there: -# https://github.com/roles-ansible and are tagged -# with 'github-actions' --> https://github.com/search?q=topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + script: - - ansible-lint . - - echo -e "\n\n\n\n\nWe use github actions for more detailed tests.\n\nMore details about that in our github repo at:\nhttps://github.com/roles-ansible/role-ranger/actions\n\n\n\n\n\n" + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check notifications: - email: - on_success: never - on_failure: always webhooks: https://galaxy.ansible.com/api/v1/notifications/