File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1+ name : Continuous Integration
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches : [ main ]
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Build Docker image
16+ run : docker build -t ci-image -f config/docker/php/Dockerfile --target ci .
17+
18+ - name : Run PHPUnit tests
19+ run : docker run --rm ci-image ./vendor/bin/phpunit
Original file line number Diff line number Diff line change @@ -8,14 +8,19 @@ COPY config/docker/php/conf.d/*.ini /usr/local/etc/php/conf.d/
88
99RUN docker-php-ext-install zip
1010
11- FROM php-installed
12-
1311COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
1412ENV COMPOSER_ALLOW_SUPERUSER=1
1513
1614RUN mkdir -p /app/var/cache
1715WORKDIR /app
1816
17+ FROM php-installed AS ci
18+ COPY composer.json composer.lock ./
19+ RUN composer install --prefer-dist --no-progress
20+ COPY . .
21+
22+ FROM php-installed AS dev
23+ RUN pecl install xdebug && docker-php-ext-enable xdebug
1924
2025
2126# # install and cache composer dependencies
Original file line number Diff line number Diff line change 11services :
22 php :
3+ build :
4+ target : dev
35 volumes :
46 - ./:/app
You can’t perform that action at this time.
0 commit comments