File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 77matrix :
88 include :
99 - php : 7.2
10- env : PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1
10+ env : PREFER_LOWEST="" DB=mysql RUN_PHPSTAN=1 RUN_CSCHECK=1 RUN_REQUIRECHECKER=1 RUN_PERF_TEST=1
1111 services :
1212 - mysql
1313 - php : 7.3
@@ -98,6 +98,21 @@ script:
9898 if [ "$RUN_REQUIRECHECKER" == "1" ] ; then
9999 composer require-checker
100100 fi
101+ - |
102+ if [ "$RUN_PERF_TEST" == "1" ] ; then
103+ echo "***** Running PHPBENCH on current branch *****" && \
104+ ./phpbench.dist.sh run --tag=current_pr --store
105+ fi
106+ after_success :
107+ - |
108+ if [ "$RUN_PERF_TEST" == "1" ] && [ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" != "master" ] ; then
109+ git fetch --unshallow && \
110+ git checkout master && \
111+ composer update && \
112+ echo "***** Running PHPBENCH on master branch for comparison *****" && \
113+ ./phpbench.dist.sh run --tag=master --store && \
114+ ./phpbench.dist.sh report --uuid=tag:current_pr --uuid=tag:master --report='{extends: compare, compare: tag}'
115+ fi
101116after_script :
102117- if [ "$COVERALLS" = "true" ] ; then ./vendor/bin/php-coveralls -v; fi
103118- if [ "$COVERALLS" = "true" ] ; then vendor/bin/couscous travis-auto-deploy --php-version=7.1 -vvv; fi
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ export DB_USERNAME=root
88export DB_PASSWORD=
99export DB_NAME=tdbm_benchmark
1010
11- vendor/bin/phpbench
11+ vendor/bin/phpbench " $@ "
Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ private static function recursiveDelete(string $str): bool
120120 return false ;
121121 }
122122
123- private function getConnection (): Connection
123+ private static function getConnection (): Connection
124124 {
125125 return ConnectionFactory::createConnection (
126126 getenv ('DB_DRIVER ' ) ?: null ,
You can’t perform that action at this time.
0 commit comments