mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2025-02-16 01:11:28 +01:00
Run tests for php 5.6
This commit is contained in:
parent
1cd50cb01c
commit
12c6c0622e
11
.travis.yml
11
.travis.yml
@ -22,25 +22,25 @@ env:
|
|||||||
init: /sbin/init
|
init: /sbin/init
|
||||||
run_opts: ""
|
run_opts: ""
|
||||||
SITE: package
|
SITE: package
|
||||||
PHP_VERSION: 5.3
|
PHP_VERSION: 5.6
|
||||||
- distribution: centos
|
- distribution: centos
|
||||||
version: 7
|
version: 7
|
||||||
init: /usr/lib/systemd/systemd
|
init: /usr/lib/systemd/systemd
|
||||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||||
SITE: package
|
SITE: package
|
||||||
PHP_VERSION: 5.4
|
PHP_VERSION: 5.6
|
||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
version: 14.04
|
version: 14.04
|
||||||
init: /sbin/init
|
init: /sbin/init
|
||||||
run_opts: ""
|
run_opts: ""
|
||||||
SITE: package
|
SITE: package
|
||||||
PHP_VERSION: 5.5
|
PHP_VERSION: 5.6
|
||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
version: 12.04
|
version: 12.04
|
||||||
init: /sbin/init
|
init: /sbin/init
|
||||||
run_opts: ""
|
run_opts: ""
|
||||||
SITE: package
|
SITE: package
|
||||||
PHP_VERSION: 5.3
|
PHP_VERSION: 5.6
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
@ -57,6 +57,9 @@ script:
|
|||||||
# Run container in detached state
|
# Run container in detached state
|
||||||
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}-${version}:ansible "${init}" > "${container_id}"'
|
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}-${version}:ansible "${init}" > "${container_id}"'
|
||||||
|
|
||||||
|
# Install dependencies.
|
||||||
|
- 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml'
|
||||||
|
|
||||||
# Ansible syntax check.
|
# Ansible syntax check.
|
||||||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test-${SITE}.yml --syntax-check'
|
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test-${SITE}.yml --syntax-check'
|
||||||
|
|
||||||
|
2
tests/requirements.yml
Normal file
2
tests/requirements.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- src: geerlingguy.repo-remi
|
@ -3,11 +3,18 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
php_enable_webserver: false
|
php_enable_webserver: false
|
||||||
|
php_version: 5.6
|
||||||
|
php_enablerepo: "remi,remi-php56"
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: Ensure build dependencies are installed (RedHat).
|
- name: Ensure build dependencies are installed (RedHat).
|
||||||
yum: name=which state=present
|
yum: name=which state=present
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
|
||||||
|
- name: Add repository for PHP 5.6.
|
||||||
|
apt_repository: repo='ppa:ondrej/php5-5.6'
|
||||||
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
- { role: geerlingguy.repo-remi, when: ansible_os_family == 'RedHat' }
|
||||||
- role_under_test
|
- role_under_test
|
||||||
|
Loading…
Reference in New Issue
Block a user