Use more recent docker-compose version

This commit is contained in:
Matthias Mullie 2022-11-16 10:09:48 +01:00
parent d84829dd5e
commit 7cc4b0eaa9
3 changed files with 30 additions and 32 deletions

View File

@ -7,31 +7,21 @@ on:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Test PHP 8.1 & submit codecov
run: make test PHP=8.1 UP=1 DOWN=0 && bash <(curl -s https://codecov.io/bash) && make down PHP=8.1
- name: Test PHP 8.0
run: make test PHP=8.0
- name: Test PHP 7.4
run: make test PHP=7.4
- name: Test PHP 7.3
run: make test PHP=7.3
- name: Test PHP 7.2
run: make test PHP=7.2
- name: Test PHP 7.1
run: make test PHP=7.1
- name: Test PHP 5.6
run: make test PHP=5.6

View File

@ -1,7 +1,7 @@
version: '2.1'
version: '3.8'
services:
php:
build:
php: &default-php
build: &default-php-build
context: .
dockerfile: Dockerfile
volumes:
@ -10,43 +10,51 @@ services:
- ./tests:/var/www/tests
- ./build:/var/www/build
- ./phpunit.xml.dist:/var/www/phpunit.xml.dist
'8.1':
extends: php
php-8.1:
<<: *default-php
build:
<<: *default-php-build
args:
version: 8.1-cli
'8.0':
extends: php
php-8.0:
<<: *default-php
build:
<<: *default-php-build
args:
version: 8.0-cli
'7.4':
extends: php
php-7.4:
<<: *default-php
build:
<<: *default-php-build
args:
version: 7.4-cli
'7.3':
extends: php
php-7.3:
<<: *default-php
build:
<<: *default-php-build
args:
version: 7.3-cli
'7.2':
extends: php
php-7.2:
<<: *default-php
build:
<<: *default-php-build
args:
version: 7.2-cli
'7.1':
extends: php
php-7.1:
<<: *default-php
build:
<<: *default-php-build
args:
version: 7.1-cli
'7.0':
extends: php
php-7.0:
<<: *default-php
build:
<<: *default-php-build
args:
version: 7.0-cli
'5.6':
extends: php
php-5.6:
<<: *default-php
build:
<<: *default-php-build
args:
version: 5.6-cli

View File

@ -13,12 +13,12 @@ image:
docker build -t matthiasmullie/minify .
up:
docker-compose up -d $(PHP)
docker-compose up -d php-$(PHP)
down:
docker-compose stop -t0 $(PHP)
docker-compose stop -t0 php-$(PHP)
test:
[ $(UP) -eq 1 ] && make up || true
$(eval cmd='docker-compose run $(PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit $(TEST)')
$(eval cmd='docker-compose run php-$(PHP) env XDEBUG_MODE=coverage vendor/bin/phpunit $(TEST)')
eval $(cmd); status=$$?; [ $(DOWN) -eq 1 ] && make down; exit $$status