Run tests for php 5.6

This commit is contained in:
Oskar Schöldström 2016-02-16 16:59:49 -05:00
parent 1cd50cb01c
commit 12c6c0622e
3 changed files with 16 additions and 4 deletions

View File

@ -22,25 +22,25 @@ env:
init: /sbin/init
run_opts: ""
SITE: package
PHP_VERSION: 5.3
PHP_VERSION: 5.6
- distribution: centos
version: 7
init: /usr/lib/systemd/systemd
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
SITE: package
PHP_VERSION: 5.4
PHP_VERSION: 5.6
- distribution: ubuntu
version: 14.04
init: /sbin/init
run_opts: ""
SITE: package
PHP_VERSION: 5.5
PHP_VERSION: 5.6
- distribution: ubuntu
version: 12.04
init: /sbin/init
run_opts: ""
SITE: package
PHP_VERSION: 5.3
PHP_VERSION: 5.6
services:
- docker
@ -57,6 +57,9 @@ script:
# 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}"'
# Install dependencies.
- 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml'
# 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'

2
tests/requirements.yml Normal file
View File

@ -0,0 +1,2 @@
---
- src: geerlingguy.repo-remi

View File

@ -3,11 +3,18 @@
vars:
php_enable_webserver: false
php_version: 5.6
php_enablerepo: "remi,remi-php56"
pre_tasks:
- name: Ensure build dependencies are installed (RedHat).
yum: name=which state=present
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:
- { role: geerlingguy.repo-remi, when: ansible_os_family == 'RedHat' }
- role_under_test