-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
51 lines (39 loc) · 1.21 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
50
51
---
sudo: required
language: python
python: "2.7"
cache: pip
env:
- DISTRO=2021-09-java
- DISTRO=2021-09-cpp
- DISTRO=2022-09-java
- DISTRO=2022-09-cpp
addons:
apt:
packages:
- python-pip
jdk: openjdk11
install:
# Install Ansible.
- pip install ansible==2.4.3.0
# install dependent role
- ansible-galaxy install --roles-path=tests/roles --role-file=tests/roles/requirements.yml
script:
- "cd tests"
# check syntax
- "ansible-playbook -i inventory-${DISTRO} test.yml --syntax-check"
# run playbook
- "ansible-playbook -i inventory-${DISTRO} test.yml --connection=local"
# run again to check if it is indempotent
- >
ansible-playbook -i inventory-${DISTRO} test.yml --connection=local
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
# check that is eclipse is installed and which plugins are installed
- >
${HOME}/sw/eclipse/*.*/eclipse/eclipse -nosplash -application org.eclipse.equinox.p2.director -listTags -listInstalledRoots
&& (echo 'eclipse installed' && exit 0)
|| (echo 'eclipse missing' && exit 1)
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/