From ee9a148c0864e83d8386fb986dd4bd4c89d36f17 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Sun, 14 May 2017 23:10:58 -0500 Subject: [PATCH] Fixes #191: Add tests for Debian 8. --- .travis.yml | 7 +++++++ tests/test.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3d24685..2f0f597 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ env: - 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 @@ -49,5 +52,9 @@ script: # 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 status php${php_version}-fpm status || true + - docker exec --tty ${container_id} env TERM=xterm systemctl status php-fpm status || true + notifications: webhooks: https://galaxy.ansible.com/api/v1/notifications/ diff --git a/tests/test.yml b/tests/test.yml index eecafef..baaa790 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -3,6 +3,7 @@ vars: php_enable_webserver: false + php_enable_php_fpm: true php_memory_limit: "192M" php_enablerepo: "remi,remi-php70" php_install_recommends: no @@ -13,6 +14,7 @@ when: ansible_os_family == 'Debian' changed_when: false + # Ubuntu-specific tasks. - include_vars: test-vars-ubuntu1204.yml when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04' @@ -24,6 +26,32 @@ apt_repository: repo='ppa:ondrej/php' when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '12.04' + # Debian-specific tasks. + - name: Add dependencies for PHP versions (Debian). + apt: + name: "{{ item }}" + with_items: + - apt-transport-https + - ca-certificates + when: ansible_distribution == "Debian" + + - name: Add Ondrej Sury's apt key (Debian). + apt_key: + url: https://packages.sury.org/php/apt.gpg + state: present + when: ansible_distribution == "Debian" + + - name: Add Ondrej Sury's repo (Debian). + apt_repository: + repo: "deb https://packages.sury.org/php/ {{ ansible_distribution_release }} main" + state: present + register: php_ondrej_debian_repo + when: ansible_distribution == "Debian" + + - name: Update apt caches after repo is added (Debian). + apt: update_cache=yes + when: php_ondrej_debian_repo.changed and (ansible_distribution == "Debian") + roles: - role: geerlingguy.repo-remi when: ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora'