Simplify tests (don't need dotdeb role + force php_version)

This commit is contained in:
Emilien Mantel
2016-03-04 07:12:41 +01:00
parent fd3d404c31
commit e257e8bde7
5 changed files with 18 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb
CMD ["sh", "tests/test.sh", "php-5.6"]
RUN apt-get update
CMD ["sh", "tests/test.sh", "5.6"]

View File

@@ -1,5 +1,5 @@
FROM williamyeh/ansible:debian8-onbuild
RUN apt-get update && ansible-galaxy install HanXHX.dotdeb
CMD ["sh", "tests/test.sh", "php-7.0"]
RUN apt-get update
CMD ["sh", "tests/test.sh", "7.0"]

View File

@@ -12,7 +12,7 @@ set -ev
# Only for travis
if [ -n "$1" ]
then
ANSIBLE_ARG="--limit $1"
ANSIBLE_ARG="-e 'php_version: $1'"
fi

View File

@@ -1,12 +1,5 @@
---
# On Debian Jessie, we need Dotdeb for PHP 7.0
- hosts: php-7.0
roles:
- role: HanXHX.dotdeb
when: >
ansible_distribution_major_version | version_compare(8, 'eq')
- hosts: all
vars:
vhost: 'test.local'
@@ -14,6 +7,11 @@
- '{{ php_apt_prefix }}recode'
php_install_xdebug: true
pre_tasks:
- name: APT | Add Dotdeb repository for Jessie + PHP7
apt_repository: repo='deb http://packages.dotdeb.org jessie all' state=present
when: >
ansible_distribution_major_version | version_compare(8, 'eq') and
php_version | version_compare('7.0', 'ge')
- name: APT | Install nginx
apt: pkg=nginx state=present update_cache=yes cache_valid_time=3600
- name: SHELL | Get nginx version