Skip to content

Commit

Permalink
DevKit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI authored and greg0ire committed Mar 16, 2020
1 parent ca04bf8 commit 194bfa2
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 @@ -24,10 +24,8 @@ cache:
env:
global:
- PATH="$HOME/.local/bin:$PATH"
- SYMFONY_DEPRECATIONS_HELPER=max[self]=0
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/SonataUserBundle.git
- PHPUNIT_VERSION=8

matrix:
fast_finish: true
Expand Down Expand Up @@ -70,6 +68,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 194bfa2

Please sign in to comment.