homeserver/roles/riemers.gitlab-runner/.travis.yml

65 lines
2.4 KiB
YAML
Raw Normal View History

2021-02-13 14:20:18 +01:00
---
jobs:
include:
- os: linux
dist: focal
python: "3.8"
language: python
addons:
apt:
packages:
- python3-pip
install:
# Install ansible
- sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- echo $PATH
- pip3 install ansible flask
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
#- printf '[defaults]\nroles_path=../' > ansible.cfg
- "{ echo '[defaults]'; echo 'roles_path = ../'; } > ansible.cfg"
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Running tests
- ansible-playbook tests/test.yml -i tests/inventory
after_failure:
- touch ~/mock_ci.pid && cat ~/mock_ci.pid
- touch ~/mock_ci.log && cat ~/mock_ci.log
- os: osx
osx_image: xcode10.3
# See https://github.com/travis-ci/travis-ci/issues/2312#issuecomment-422830059
#language: python
language: generic
install:
# Install ansible
- pip install ansible flask
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' > ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Running tests
- ansible-playbook tests/test.yml -i tests/inventory
after_failure:
- touch ~/mock_ci.pid && cat ~/mock_ci.pid
- touch ~/mock_ci.log && cat ~/mock_ci.log
- os: windows
language: shell
install:
- powershell -ExecutionPolicy ByPass -File tests/travis-bootstrap-ansible.ps1
- wsl ansible --version
script:
- wsl mkdir -p tests/roles/ansible-gitlab-runner/
- cd tests/roles/ansible-gitlab-runner/
- wsl ln -s ../../../* .
- cd ../../
- wsl ansible-playbook test.yml -i inventory --syntax-check
# Running tests
- wsl ansible-playbook test.yml -i inventory --extra-vars 'ansible_user=ansible ansible_password=Ans1ble_User! ansible_connection=winrm ansible_winrm_server_cert_validation=ignore ansible_ssh_port=5986'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/