Skip to content

Commit 67dbe49

Browse files
committed
Black box testsuite runs on all supported PHP versions
1 parent 3abd77d commit 67dbe49

File tree

3 files changed

+50
-40
lines changed

3 files changed

+50
-40
lines changed

.github/workflows/CI.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ jobs:
7272
name: Infection report
7373
path: infection.log
7474
integration:
75-
name: Integration tests
75+
name: Integration tests on PHP ${{ matrix.php }}
7676
runs-on: ubuntu-20.04
77+
strategy:
78+
matrix:
79+
php: [ '7.3', '7.4', '8.0.0RC5' ]
7780
steps:
7881
- name: Checkout
7982
uses: actions/checkout@v2.3.4
@@ -84,10 +87,16 @@ jobs:
8487
docker-compose up -d
8588
sleep 10
8689
docker ps -a
90+
env:
91+
PHP_VERSION: ${{ matrix.php }}
8792
- name: Tests with Redis
8893
run: docker-compose exec -T phpunit env ADAPTER=redis vendor/bin/phpunit --testsuite=functionnal
94+
env:
95+
PHP_VERSION: ${{ matrix.php }}
8996
- name: Tests with APCU
9097
run: docker-compose exec -T phpunit env ADAPTER=apcu vendor/bin/phpunit --testsuite=functionnal
98+
env:
99+
PHP_VERSION: ${{ matrix.php }}
91100
code_quality:
92101
name: Code quality
93102
runs-on: ubuntu-20.04

docker-compose.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
nginx:
2-
build: nginx/
3-
links:
4-
- php-fpm
5-
ports:
6-
- 8080:80
1+
version: "2"
72

8-
php-fpm:
9-
build: php-fpm/
10-
volumes:
11-
- .:/var/www/html
12-
links:
13-
- redis
14-
- pushgateway
15-
environment:
16-
- REDIS_HOST=redis
17-
18-
redis:
19-
image: redis
20-
ports:
21-
- 6379:6379
22-
23-
pushgateway:
24-
image: prom/pushgateway
25-
ports:
26-
- 9091:9091
27-
28-
phpunit:
29-
build: php-fpm/
30-
volumes:
31-
- .:/var/www/html
32-
links:
33-
- redis
34-
- pushgateway
35-
- nginx
36-
environment:
37-
- REDIS_HOST=redis
3+
services:
4+
nginx:
5+
build:
6+
context: nginx/
7+
depends_on:
8+
- php-fpm
9+
php-fpm:
10+
build:
11+
context: php-fpm/
12+
args:
13+
PHP_VERSION: ${PHP_VERSION:-7.3}
14+
volumes:
15+
- .:/var/www/html
16+
environment:
17+
- REDIS_HOST=redis
18+
depends_on:
19+
- redis
20+
- pushgateway
21+
redis:
22+
image: redis
23+
pushgateway:
24+
image: prom/pushgateway
25+
phpunit:
26+
build:
27+
context: php-fpm/
28+
args:
29+
PHP_VERSION: ${PHP_VERSION:-7.3}
30+
volumes:
31+
- .:/var/www/html
32+
environment:
33+
- REDIS_HOST=redis
34+
depends_on:
35+
- nginx
36+
- pushgateway
37+
- redis

php-fpm/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
FROM php:7.3-fpm
1+
ARG PHP_VERSION
2+
FROM php:${PHP_VERSION}-fpm
23

3-
RUN pecl install redis-5.0.2 && \
4-
pecl install apcu-5.1.17 && \
4+
RUN pecl install redis-5.3.2 && \
5+
pecl install apcu-5.1.19 && \
56
docker-php-ext-enable redis apcu
67

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

0 commit comments

Comments
 (0)