forked from alvistack/ansible-role-postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (40 loc) · 1.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
dist: bionic
language: minimal
env:
matrix:
- MOLECULE_SCENARIO_NAME="centos-7"
- MOLECULE_SCENARIO_NAME="suse-15"
- MOLECULE_SCENARIO_NAME="ubuntu-16.04"
- MOLECULE_SCENARIO_NAME="ubuntu-18.04"
matrix:
allow_failures:
- env: MOLECULE_SCENARIO_NAME="centos-7"
- env: MOLECULE_SCENARIO_NAME="suse-15"
before_install:
- |
sudo apt-get -y purge lxc-* lxd-* && sudo apt-get -y autoremove
sudo apt-get update && sudo apt-get install -y snapd
sudo snap refresh && sudo snap install lxd
sudo lxd init --preseed < .travis.lxd.yml
- |
sudo apt-get -y purge python3-openssl && sudo apt-get -y autoremove
sudo apt-get update && sudo apt-get -y install curl gcc libffi-dev libssl-dev make python3 python3-dev
curl -skL https://bootstrap.pypa.io/get-pip.py | sudo -H python3
sudo -H pip3 install --upgrade --ignore-installed --requirement requirements.txt
install:
- |
export ROLE=$(echo $TRAVIS_REPO_SLUG | sed 's/^.*\/ansible-role-/\//g')
mkdir -p $HOME/.ansible/roles
ln -s $TRAVIS_BUILD_DIR $HOME/.ansible/roles/$ROLE
script:
- |
source ./scripts/run-tests.sh \
&& sudo -E molecule dependency -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule lint -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule syntax -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule converge -s $MOLECULE_SCENARIO_NAME \
&& travis_wait 120 sudo -E molecule idempotence -s $MOLECULE_SCENARIO_NAME \
&& sudo -E molecule verify -s $MOLECULE_SCENARIO_NAME
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/