Skip to content

Commit 29fd4b7

Browse files
authored
Merge pull request #5 from wmde/php72-v2
PHP 7.2 - revised
2 parents e34e57b + c20258e commit 29fd4b7

File tree

6 files changed

+12
-21
lines changed

6 files changed

+12
-21
lines changed

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
language: php
22

3+
# php version to use for travis' composer & coverage
34
php:
45
- 7.1
56

6-
sudo: false
7-
87
services:
98
- docker
109

@@ -16,7 +15,6 @@ script:
1615
- make ci
1716

1817
after_success:
19-
- if [[ "`phpenv version-name`" != "7.1" ]]; then exit 0; fi
2018
- vendor/bin/phpunit --coverage-clover coverage.clover
2119
- wget https://scrutinizer-ci.com/ocular.phar
2220
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

Dockerfile-7.1 renamed to Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM php:7.1-cli
1+
ARG PHP_VERSION
2+
3+
FROM php:${PHP_VERSION}-cli
24

35
RUN \
46
apt-get update && \

Dockerfile-7.2

Lines changed: 0 additions & 7 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,12 @@ phpunit:
2020

2121
phpcs:
2222
docker-compose run --rm fun-validators-7.1 ./vendor/bin/phpcs
23-
docker-compose run --rm fun-validators-7.2 ./vendor/bin/phpcs
2423

2524
stan:
2625
docker-compose run --rm fun-validators-7.1 ./vendor/bin/phpstan analyse --level=1 --no-progress src/ tests/
27-
docker-compose run --rm fun-validators-7.2 ./vendor/bin/phpstan analyse --level=1 --no-progress src/ tests/
2826

2927
covers:
3028
docker-compose run --rm fun-validators-7.1 ./vendor/bin/covers-validator
31-
docker-compose run --rm fun-validators-7.2 ./vendor/bin/covers-validator
3229

3330
composer:
3431
docker run --rm --interactive --tty --volume $(shell pwd):/app -w /app\

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ To run just the PHPUnit tests run
5555

5656
To run only a subset of PHPUnit tests or otherwise pass flags to PHPUnit, run
5757

58-
docker-compose run --rm app ./vendor/bin/phpunit --filter SomeClassNameOrFilter
58+
docker-compose run --rm fun-validators-7.1 ./vendor/bin/phpunit --filter SomeClassNameOrFilter
5959

6060
If you have failing unit tests but want to run them for all PHP versions
6161
(normally it would bail on the first error) you can do so using

docker-compose.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ version: '2'
33
services:
44
fun-validators-7.1:
55
build:
6-
context: ./
7-
dockerfile: Dockerfile-7.1
8-
image: fun-validators:7.1
6+
context: .
7+
args:
8+
PHP_VERSION: 7.1
99
volumes:
1010
- ./:/usr/src/app
1111
working_dir: /usr/src/app
12+
image: wmde/fun-validators:7.1
1213

1314
fun-validators-7.2:
1415
extends:
1516
service: fun-validators-7.1
1617
build:
17-
context: ./
18-
dockerfile: Dockerfile-7.2
19-
image: fun-validators:7.2
18+
args:
19+
PHP_VERSION: 7.2
20+
image: wmde/fun-validators:7.2

0 commit comments

Comments
 (0)