Skip to content

Commit

Permalink
Black box testsuite runs on all supported PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSuisse committed Nov 27, 2020
1 parent 3abd77d commit 67dbe49
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 40 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ jobs:
name: Infection report
path: infection.log
integration:
name: Integration tests
name: Integration tests on PHP ${{ matrix.php }}
runs-on: ubuntu-20.04
strategy:
matrix:
php: [ '7.3', '7.4', '8.0.0RC5' ]
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
Expand All @@ -84,10 +87,16 @@ jobs:
docker-compose up -d
sleep 10
docker ps -a
env:
PHP_VERSION: ${{ matrix.php }}
- name: Tests with Redis
run: docker-compose exec -T phpunit env ADAPTER=redis vendor/bin/phpunit --testsuite=functionnal
env:
PHP_VERSION: ${{ matrix.php }}
- name: Tests with APCU
run: docker-compose exec -T phpunit env ADAPTER=apcu vendor/bin/phpunit --testsuite=functionnal
env:
PHP_VERSION: ${{ matrix.php }}
code_quality:
name: Code quality
runs-on: ubuntu-20.04
Expand Down
72 changes: 36 additions & 36 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
nginx:
build: nginx/
links:
- php-fpm
ports:
- 8080:80
version: "2"

php-fpm:
build: php-fpm/
volumes:
- .:/var/www/html
links:
- redis
- pushgateway
environment:
- REDIS_HOST=redis

redis:
image: redis
ports:
- 6379:6379

pushgateway:
image: prom/pushgateway
ports:
- 9091:9091

phpunit:
build: php-fpm/
volumes:
- .:/var/www/html
links:
- redis
- pushgateway
- nginx
environment:
- REDIS_HOST=redis
services:
nginx:
build:
context: nginx/
depends_on:
- php-fpm
php-fpm:
build:
context: php-fpm/
args:
PHP_VERSION: ${PHP_VERSION:-7.3}
volumes:
- .:/var/www/html
environment:
- REDIS_HOST=redis
depends_on:
- redis
- pushgateway
redis:
image: redis
pushgateway:
image: prom/pushgateway
phpunit:
build:
context: php-fpm/
args:
PHP_VERSION: ${PHP_VERSION:-7.3}
volumes:
- .:/var/www/html
environment:
- REDIS_HOST=redis
depends_on:
- nginx
- pushgateway
- redis
7 changes: 4 additions & 3 deletions php-fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM php:7.3-fpm
ARG PHP_VERSION
FROM php:${PHP_VERSION}-fpm

RUN pecl install redis-5.0.2 && \
pecl install apcu-5.1.17 && \
RUN pecl install redis-5.3.2 && \
pecl install apcu-5.1.19 && \
docker-php-ext-enable redis apcu

COPY www.conf /usr/local/etc/php-fpm.d/
Expand Down

0 comments on commit 67dbe49

Please sign in to comment.