Skip to content

Commit

Permalink
fix(ci): use variable php version in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
SamMousa committed Aug 7, 2023
1 parent 62a0586 commit 6a0328e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: sockets pcov
- name: Install dependencies including dev
uses: ramsey/composer-install@v2
- name: Tests
run: composer phpunit-native
run: composer test
env:
PHP_VERSION: ${{ matrix.php }}
- uses: codecov/codecov-action@v3.1.1
with:
files: ./tests/coverage/coverage.xml
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
build:
context: ./dockerfiles
dockerfile: Dockerfile-phpunit
args:
PHP_VERSION: "${PHP_VERSION:-8.1}"
environment:
SERVER_HOST: beanstalk
UNIX_SERVER_HOST: unix:///shared/beanstalkd.sock
Expand Down
3 changes: 2 additions & 1 deletion dockerfiles/Dockerfile-phpunit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM php:8.1-cli-alpine
ARG PHP_VERSION=8.1
FROM php:${PHP_VERSION}-cli-alpine
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions \
&& sync \
Expand Down

0 comments on commit 6a0328e

Please sign in to comment.