mirror of
https://github.com/roles-ansible/ansible_role_packages.git
synced 2024-08-16 10:19:51 +02:00
Update travis based on docs
https://galaxy.ansible.com/docs/contributing/importing.html#import-roles-via-travis-ci
This commit is contained in:
parent
bfa248ba7a
commit
990fbcd66b
1 changed files with 18 additions and 18 deletions
36
.travis.yml
36
.travis.yml
|
@ -1,28 +1,28 @@
|
||||||
---
|
|
||||||
# OS Details
|
|
||||||
os: linux
|
|
||||||
language: python
|
language: python
|
||||||
python: '3.8'
|
python: "3.8"
|
||||||
|
|
||||||
cache:
|
# Use the new container infrastructure
|
||||||
pip: true
|
sudo: false
|
||||||
|
|
||||||
|
# Install ansible
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
- python-pip
|
||||||
|
|
||||||
# Install ansible and ansible-lint
|
|
||||||
install:
|
install:
|
||||||
|
# Install ansible
|
||||||
- pip install ansible
|
- pip install ansible
|
||||||
- pip install ansible-lint
|
|
||||||
|
|
||||||
# testing galaxy install and ansible lint
|
# Check ansible version
|
||||||
# more advanced testing is currently handled with
|
- ansible --version
|
||||||
# github actions. The gh-actions for our test are there:
|
|
||||||
# https://github.com/roles-ansible and are tagged
|
# Create ansible.cfg with correct roles_path
|
||||||
# with 'github-actions' --> https://github.com/search?q=topic%3Agithub-actions+org%3Aroles-ansible&type=Repositories
|
- printf '[defaults]\nroles_path=../' >ansible.cfg
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ansible-lint .
|
# Basic role syntax check
|
||||||
- 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"
|
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email:
|
|
||||||
on_success: never
|
|
||||||
on_failure: always
|
|
||||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||||
|
|
Loading…
Reference in a new issue