Skip to content

Commit

Permalink
Merge pull request #5 from wmde/php72-v2
Browse files Browse the repository at this point in the history
PHP 7.2 - revised
  • Loading branch information
wiese authored Feb 9, 2018
2 parents e34e57b + c20258e commit 29fd4b7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 21 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
language: php

# php version to use for travis' composer & coverage
php:
- 7.1

sudo: false

services:
- docker

Expand All @@ -16,7 +15,6 @@ script:
- make ci

after_success:
- if [[ "`phpenv version-name`" != "7.1" ]]; then exit 0; fi
- vendor/bin/phpunit --coverage-clover coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile-7.1 → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM php:7.1-cli
ARG PHP_VERSION

FROM php:${PHP_VERSION}-cli

RUN \
apt-get update && \
Expand Down
7 changes: 0 additions & 7 deletions Dockerfile-7.2

This file was deleted.

3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ phpunit:

phpcs:
docker-compose run --rm fun-validators-7.1 ./vendor/bin/phpcs
docker-compose run --rm fun-validators-7.2 ./vendor/bin/phpcs

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

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

composer:
docker run --rm --interactive --tty --volume $(shell pwd):/app -w /app\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ To run just the PHPUnit tests run

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

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

If you have failing unit tests but want to run them for all PHP versions
(normally it would bail on the first error) you can do so using
Expand Down
13 changes: 7 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ version: '2'
services:
fun-validators-7.1:
build:
context: ./
dockerfile: Dockerfile-7.1
image: fun-validators:7.1
context: .
args:
PHP_VERSION: 7.1
volumes:
- ./:/usr/src/app
working_dir: /usr/src/app
image: wmde/fun-validators:7.1

fun-validators-7.2:
extends:
service: fun-validators-7.1
build:
context: ./
dockerfile: Dockerfile-7.2
image: fun-validators:7.2
args:
PHP_VERSION: 7.2
image: wmde/fun-validators:7.2

0 comments on commit 29fd4b7

Please sign in to comment.