summaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-07-05 16:22:58 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-07-05 16:22:58 +0200
commit813756495d5ef33fa3cc95d69b6d88418ebe7bb1 (patch)
treed923e31d8407c9d8c04407a1224ff1afa4be2a91 /.travis.yml
downloaditm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.gz
itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.bz2
itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.tar.xz
itm-813756495d5ef33fa3cc95d69b6d88418ebe7bb1.zip
Squashed 'roles/cuda/' content from commit f82a4fe
git-subtree-dir: roles/cuda git-subtree-split: f82a4fedb62a410b1f05454ee5ba5f2e5ff0a16c
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..0cdcab4
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,47 @@
+---
+language: python
+sudo: required
+dist: trusty
+
+matrix:
+ fast_finish: true
+
+cache:
+ directories: [ '$HOME/lxc/' ]
+ pip: true
+
+before_cache:
+ - sudo mkdir $HOME/lxc && sudo tar cf $HOME/lxc/cache.tar /var/cache/lxc/ && sudo chown $USER. $HOME/lxc/cache.tar
+
+env:
+ - LXC_DISTRO=ubuntu LXC_RELEASE=xenial
+ - LXC_DISTRO=ubuntu LXC_RELEASE=trusty
+ - LXC_DISTRO=centos LXC_RELEASE=7
+ - LXC_DISTRO=centos LXC_RELEASE=6
+
+install:
+ - sudo tar xf $HOME/lxc/cache.tar -C / || true
+ - sudo apt-get install -y expect-dev
+ - pip install ansible
+ - ansible --version
+ - printf '[defaults]\nroles_path=../\ncallback_whitelist=profile_tasks' >ansible.cfg
+ - ansible-galaxy install lae.travis-lxc
+ - ansible-playbook -vvv tests/install.yml -i tests/inventory
+
+script:
+ # Basic role syntax check
+ - ansible-playbook tests/test.yml -i tests/inventory --syntax-check
+
+ # Perform a test run with the playbook
+ - travis_wait ansible-playbook tests/test.yml -i tests/inventory
+
+ # Perform a another test run with the playbook to check for idempotency
+ - 'unbuffer ansible-playbook tests/test.yml -i tests/inventory >/tmp/idempotency.log 2>&1'
+ - 'grep -A1 "PLAY RECAP" /tmp/idempotency.log | grep -qP "changed=0.*failed=0" &&
+ (echo "Idempotence: PASS"; exit 0) || (echo "Idempotence: FAIL"; cat /tmp/idempotency.log;
+ exit 1)'
+
+notifications:
+ email: false
+ flowdock:
+ secure: "lxqZTTUCUYy19JzwXnH/kRcndYwNasUYpa0AK0vcRqTRSoULRzwE2jcJUk2YBz0qTBcTgAkinj1VQbImdrl68NTPDTmOZM4+hPZ8RQNTGR7VJwy4Ynjl/RtvxmwvoW/kSZJI3twDvPpAl2yEKfiPwSE4kYNFs84w43WieNhX3qO0LN9EdFykV6M0xeZgGc71v6oGof3n9HhBMfMUYU6YZJKvirHJNwAxHsWiFSq+dfDA5hqDyilwuQM0toNgjsFi6F7b40vOVJPGJKdSNekrFgp2Gm/Fzd83sO/Sp1ord9v73UflshejKuK2/iMRddPW5JDl05FNrJ7x6xcCfK9sxOj5KDELotagHCDdCTqX4USelBpI7DeO9yV8NAIxyL2KAFi5b3uwvF5reitGhRfdeqA0B9eK+k6vdRQ/xKryYc48hVX46wraL2ibZv2gbic7vpYdxiWFUirKB9NBoQu7JHkTT/LT3LjbC9/uL9c4qRyakAnQwhgi4/sEk7f9euvtZA6MJfZpCzfiYVt3rGe6H9HqcCflnxW5F1ZjLBSkHk02rNn6hcfFxGHSS5x1362F9JCwVkAWgJ43JvQLRxobW4htbx56+niX0zS+vs2kK5K3NxUCJzInUb4UV5/9lwcCBZQJL0fD4u2Gy8/TC7MrhhOVxkSSPmjjoonaRPY497c="