Skip to content

Commit 53138b1

Browse files
committed
feat: dedicated php CI Docker stage + use pcov in CI for coverage
1 parent 3e2bacb commit 53138b1

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

compose.ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66

77
php:
88
build:
9-
target: gally_php_dev
9+
target: gally_php_ci
1010
volumes: !override
1111
- ./api:/app:rw,cached,z
1212
- ./docker/php/conf.d/app.dev.ini:/usr/local/etc/php/conf.d/app.dev.ini:ro,z

docker/php/Dockerfile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ RUN set -eux; \
4444
zip \
4545
;
4646

47-
# Install PCov separately via PECL
48-
RUN pecl install pcov && docker-php-ext-enable pcov
49-
5047
###> recipes ###
5148
###> doctrine/doctrine-bundle ###
5249
RUN set -eux; \
@@ -85,6 +82,21 @@ COPY --link conf.d/app.dev.ini $PHP_INI_DIR/conf.d/
8582

8683
CMD ["php-fpm"]
8784

85+
# CI php image
86+
FROM gally_php_base AS gally_php_ci
87+
88+
ENV APP_ENV=dev
89+
VOLUME /app/var/
90+
91+
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
92+
93+
RUN set -eux; \
94+
install-php-extensions \
95+
pcov \
96+
;
97+
98+
CMD ["php-fpm"]
99+
88100
# Prod php image
89101
FROM gally_php_base AS gally_php_prod
90102

0 commit comments

Comments
 (0)