Skip to content

Commit

Permalink
Merge 3.x into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Mar 17, 2020
2 parents 428bdba + 63e76da commit 75d5cfe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ cache:
env:
global:
- PATH="$HOME/.local/bin:$PATH"
- SYMFONY_DEPRECATIONS_HELPER=max[self]=0
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/SonataDoctrineMongoDBAdminBundle.git
- PHPUNIT_VERSION=8

matrix:
fast_finish: true
Expand Down Expand Up @@ -63,6 +61,7 @@ install:
- if [ -x .travis/install_${TARGET}.sh ]; then .travis/install_${TARGET}.sh; fi;

before_script:
- phpenv config-rm xdebug.ini
- if [ -x .travis/before_script_${TARGET}.sh ]; then .travis/before_script_${TARGET}.sh; fi;

script: make $TARGET
Expand Down
5 changes: 2 additions & 3 deletions .travis/install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ set -ev

mkdir --parents "${HOME}/bin"

wget "https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar" --output-document="${HOME}/bin/phpunit"
chmod u+x "${HOME}/bin/phpunit"

# Coveralls client install
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar --output-document="${HOME}/bin/coveralls"
chmod u+x "${HOME}/bin/coveralls"

pecl install pcov

composer update --prefer-dist --no-interaction --prefer-stable ${COMPOSER_FLAGS}
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,11 @@ cs-fix-xml:
build:
mkdir $@

HAS_XDEBUG=$(shell php --modules|grep --quiet xdebug;echo $$?)

build/xdebug-filter.php: phpunit.xml.dist build
ifeq ($(HAS_XDEBUG), 0)
phpunit --dump-xdebug-filter $@
endif

test: build/xdebug-filter.php
ifeq ($(HAS_XDEBUG), 0)
phpunit --prepend build/xdebug-filter.php -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
test:
ifeq ($(shell php --modules|grep --quiet pcov;echo $$?), 0)
vendor/bin/simple-phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
else
phpunit -c phpunit.xml.dist
vendor/bin/simple-phpunit -c phpunit.xml.dist
endif
.PHONY: test

Expand Down
9 changes: 4 additions & 5 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ It's auto-generated by sonata-project/dev-kit package.
</testsuite>
</testsuites>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>

<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>

<php>
<ini name="precision" value="8"/>
<ini name="precision" value="8" />
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0" />
<env name="SYMFONY_PHPUNIT_REMOVE" value="symfony/yaml" />
<env name="SYMFONY_PHPUNIT_VERSION" value="8.5.0" />
</php>

</phpunit>

0 comments on commit 75d5cfe

Please sign in to comment.