.travis.yml 849 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. services: docker
  3. env:
  4. - distro: centos7
  5. - distro: ubuntu1604
  6. - distro: ubuntu1404
  7. - distro: ubuntu1204
  8. script:
  9. # Configure test script so we can run extra tests after playbook is run.
  10. - export container_id=$(date +%s)
  11. - export cleanup=false
  12. # Download test shim.
  13. - wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
  14. - chmod +x ${PWD}/tests/test.sh
  15. # Run tests.
  16. - ${PWD}/tests/test.sh
  17. # Setup test site.
  18. - 'docker exec ${container_id} mkdir -p /var/www/test'
  19. - 'docker exec ${container_id} bash -c "echo Success >| /var/www/test/index.html"'
  20. # Make sure virtualhost exists.
  21. - 'docker exec --tty ${container_id} env TERM=xterm curl http://test.dev/ | grep "Success"'
  22. notifications:
  23. webhooks: https://galaxy.ansible.com/api/v1/notifications/