mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-15 10:35:11 +01:00
61 lines
1.9 KiB
YAML
61 lines
1.9 KiB
YAML
---
|
|
services: docker
|
|
|
|
env:
|
|
# Test package install on all supported OSes.
|
|
- distro: centos7
|
|
playbook: test.yml
|
|
php_version: 7.0
|
|
- distro: fedora24
|
|
playbook: test.yml
|
|
php_version: 5.6
|
|
- distro: debian8
|
|
playbook: test.yml
|
|
php_version: 7.0
|
|
- distro: ubuntu1604
|
|
playbook: test.yml
|
|
php_version: 7.0
|
|
- distro: ubuntu1404
|
|
playbook: test.yml
|
|
php_version: 7.0
|
|
- distro: ubuntu1204
|
|
playbook: test.yml
|
|
php_version: 5.6
|
|
|
|
# Only test source install on latest supported OSes.
|
|
- distro: centos7
|
|
playbook: test-source.yml
|
|
php_version: 7.0.13
|
|
- distro: ubuntu1604
|
|
playbook: test-source.yml
|
|
php_version: 7.0.13
|
|
|
|
script:
|
|
# Configure test script so we can run extra tests after playbook is run.
|
|
- export container_id=$(date +%s)
|
|
- export cleanup=false
|
|
|
|
# Download test shim.
|
|
- wget -O ${PWD}/tests/test.sh https://gist.githubusercontent.com/geerlingguy/73ef1e5ee45d8694570f334be385e181/raw/
|
|
- chmod +x ${PWD}/tests/test.sh
|
|
|
|
# Run tests.
|
|
- ${PWD}/tests/test.sh
|
|
|
|
# Ensure PHP is installed and at the right version.
|
|
- 'docker exec --tty ${container_id} env TERM=xterm which php'
|
|
- 'docker exec --tty ${container_id} env TERM=xterm test -x /usr/bin/php'
|
|
|
|
- 'docker exec --tty ${container_id} env TERM=xterm php --version'
|
|
- 'docker exec --tty ${container_id} env TERM=xterm /usr/bin/php --version | grep -qF "PHP ${php_version}"'
|
|
|
|
# Ensure PHP configurations have taken effect.
|
|
- docker exec --tty ${container_id} env TERM=xterm php -i | grep 'memory_limit.*192'
|
|
|
|
# Check the status of PHP-FPM (but don't fail if not found).
|
|
- docker exec --tty ${container_id} env TERM=xterm systemctl --no-pager status php${php_version}-fpm status || true
|
|
- docker exec --tty ${container_id} env TERM=xterm systemctl --no-pager status php-fpm status || true
|
|
|
|
notifications:
|
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|