ansible-nginx/.travis.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

2021-09-01 16:21:12 +07:00
---
env:
2021-09-01 17:05:07 +07:00
global:
- VAGRANT_VERSION='2.2.18'
jobs:
- PLATFORM='docker-debian-bullseye' ANSIBLE_VERSION='>=2.11,<2.12'
- PLATFORM='docker-debian-buster' ANSIBLE_VERSION='>=2.11,<2.12'
2018-03-15 18:56:12 +07:00
2021-09-01 17:05:07 +07:00
os:
- linux
dist: focal
2016-10-13 15:19:24 +07:00
2015-10-08 00:31:12 +07:00
language: python
2020-05-18 21:10:42 +07:00
python:
2021-09-01 17:05:07 +07:00
- 3.8
2015-10-08 00:31:12 +07:00
services:
- docker
2015-08-04 17:26:38 +07:00
before_install:
2021-09-01 17:05:07 +07:00
- sudo apt-get -q update
- sudo apt-get install -y yamllint
- sudo wget -nv https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb
- sudo dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb
install:
2021-09-01 17:05:07 +07:00
- sudo pip install "ansible-core$ANSIBLE_VERSION"
- sudo pip install ansible-lint
- ansible-galaxy collection install community.general
2022-11-25 15:52:40 +07:00
- ansible-galaxy install -p ./tests hanxhx.php
2015-08-04 17:26:38 +07:00
script:
- VAGRANT_DEFAULT_PROVIDER=docker vagrant up $PLATFORM
- >
VAGRANT_DEFAULT_PROVIDER=docker vagrant provision $PLATFORM
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
- VAGRANT_DEFAULT_PROVIDER=docker vagrant status
2021-09-01 17:05:07 +07:00
- >
yamllint .
&& (echo 'YAML lint test: pass' && exit 0)
|| (echo 'YAML lint test: fail' && exit 1)
- >
ansible-lint -v tests/test.yml
&& (echo 'Ansible lint test: pass' && exit 0)
|| (echo 'Ansible lint test: fail' && exit 1)
2016-03-05 18:06:08 +07:00
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/