Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
c37710b2
Unverified
Commit
c37710b2
authored
Apr 27, 2018
by
Sergei Morozov
Committed by
GitHub
Apr 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3092 from Majkl578/tests-better-coverage
CI: Aggregate coverage from multiple jobs
parents
6ee7d7d2
e0ee64e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
38 deletions
+88
-38
.appveyor.yml
.appveyor.yml
+30
-4
.scrutinizer.yml
.scrutinizer.yml
+1
-0
.travis.yml
.travis.yml
+57
-28
sqlite.travis.xml
tests/travis/sqlite.travis.xml
+0
-6
No files found.
.appveyor.yml
View file @
c37710b2
...
...
@@ -4,13 +4,15 @@ platform:
#matrix:
# fast_finish: true # kills the build at the first failure
clone_folder
:
C:\projects\dbal
clone_depth
:
1
clone_depth
:
2
cache
:
-
C:\ProgramData\chocolatey\bin -> .appveyor.yml
-
C:\ProgramData\chocolatey\lib -> .appveyor.yml
-
C:\tools\php -> .appveyor.yml
-
composer.phar
-
ocular.phar
-
cacert.pem
-
'
%LOCALAPPDATA%\Composer\files'
#- vendor
...
...
@@ -20,19 +22,23 @@ environment:
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2008r2sp2
coverage
:
yes
php
:
7.2
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2012sp1
php
:
7.2
coverage
:
yes
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2017
coverage
:
no
php
:
7.2
-
db
:
mssql
driver
:
pdo_sqlsrv
db_version
:
sql2017
php
:
7.2
coverage
:
yes
init
:
-
SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
...
...
@@ -59,6 +65,7 @@ install:
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_curl.dll"
# Get and install the MSSQL DLL's
$DLLVersion = "5.2.0rc1"
...
...
@@ -71,10 +78,15 @@ install:
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
$DLLVersion = "2.6.0"
$source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll"
$destination = "c:\tools\php\ext\php_xdebug.dll"
Invoke-WebRequest $source -OutFile $destination
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`nzend_extension=php_xdebug.dll"
Add-Content php.ini "`n"
cd c:\projects\dbal
...
...
@@ -82,6 +94,14 @@ install:
if (!(Test-Path c:\projects\dbal\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
}
if (!(Test-Path c:\projects\dbal\ocular.phar)) {
appveyor-retry appveyor DownloadFile https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
}
if (!(Test-Path c:\projects\dbal\cacert.pem)) {
appveyor-retry appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem
}
}
# install composer dependencies
-
rm composer.lock
...
...
@@ -100,8 +120,14 @@ test_script:
-
cd C:\projects\dbal
-
ps
:
>-
if ($env:db_version) {
vendor\bin\phpunit -c tests\appveyor\%db%.%db_version%.%driver%.appveyor.xml
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
} else {
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
else {
vendor\bin\phpunit -c tests\appveyor\%db%.%driver%.appveyor.xml
-
ps
:
>-
if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
php.exe -d curl.cainfo=c:\projects\dbal\cacert.pem ocular.phar code-coverage:upload --format=php-clover clover.xml
} else {
vendor\bin\phpunit -c $($env:phpunit_config)
}
.scrutinizer.yml
View file @
c37710b2
...
...
@@ -21,6 +21,7 @@ before_commands:
tools
:
external_code_coverage
:
timeout
:
3600
runs
:
20
# 17x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes)
filter
:
excluded_paths
:
...
...
.travis.yml
View file @
c37710b2
...
...
@@ -18,26 +18,67 @@ env:
-
DB=mysqli
before_install
:
-
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
-
|
if [ "x$COVERAGE" != "xyes" ]; then
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || true
fi
before_script
:
-
if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi;
-
|
if [ "x$COVERAGE" == "xyes" ] && [[ ! $(php -m | grep -si xdebug) ]]; then
echo "xdebug is required for coverage"
exit 1
fi
install
:
-
rm composer.lock
-
travis_retry composer -n update --prefer-dist
script
:
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
script
:
-
|
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
else
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
fi
after_script
:
-
|
if [ "x$COVERAGE" == "xyes" ]; then
wget https://github.com/scrutinizer-ci/ocular/releases/download/1.5.2/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover clover.xml
fi
jobs
:
allow_failures
:
-
php
:
nightly
-
stage
:
Coding standard
exclude
:
-
php
:
7.1
env
:
DB=sqlite
-
php
:
7.1
env
:
DB=mysql
-
php
:
7.1
env
:
DB=mysqli
include
:
-
stage
:
Test
php
:
7.1
env
:
DB=mysql MYSQL_VERSION=5.7
env
:
DB=sqlite COVERAGE=yes
-
stage
:
Test
php
:
7.1
env
:
DB=mysql COVERAGE=yes
-
stage
:
Test
php
:
7.1
env
:
DB=mysqli COVERAGE=yes
-
stage
:
Test
php
:
7.1
env
:
DB=mysql MYSQL_VERSION=5.7 COVERAGE=yes
sudo
:
required
before_script
:
-
bash ./tests/travis/install-mysql-5.7.sh
...
...
@@ -56,7 +97,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=mysqli MYSQL_VERSION=5.7
env
:
DB=mysqli MYSQL_VERSION=5.7
COVERAGE=yes
sudo
:
required
before_script
:
-
bash ./tests/travis/install-mysql-5.7.sh
...
...
@@ -75,7 +116,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=mariadb MARIADB_VERSION=10.0
env
:
DB=mariadb MARIADB_VERSION=10.0
COVERAGE=yes
addons
:
mariadb
:
10.0
-
stage
:
Test
...
...
@@ -91,7 +132,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=mariadb MARIADB_VERSION=10.1
env
:
DB=mariadb MARIADB_VERSION=10.1
COVERAGE=yes
addons
:
mariadb
:
10.1
-
stage
:
Test
...
...
@@ -107,7 +148,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=mariadb MARIADB_VERSION=10.2
env
:
DB=mariadb MARIADB_VERSION=10.2
COVERAGE=yes
addons
:
mariadb
:
10.2
-
stage
:
Test
...
...
@@ -123,7 +164,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.2
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.2
COVERAGE=yes
addons
:
mariadb
:
10.2
-
stage
:
Test
...
...
@@ -139,7 +180,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=9.2
env
:
DB=pgsql POSTGRESQL_VERSION=9.2
COVERAGE=yes
services
:
-
postgresql
addons
:
...
...
@@ -161,7 +202,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=9.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.3
COVERAGE=yes
services
:
-
postgresql
addons
:
...
...
@@ -183,7 +224,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=9.4
env
:
DB=pgsql POSTGRESQL_VERSION=9.4
COVERAGE=yes
services
:
-
postgresql
addons
:
...
...
@@ -205,7 +246,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=9.5
env
:
DB=pgsql POSTGRESQL_VERSION=9.5
COVERAGE=yes
services
:
-
postgresql
addons
:
...
...
@@ -227,7 +268,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=9.6
env
:
DB=pgsql POSTGRESQL_VERSION=9.6
COVERAGE=yes
services
:
-
postgresql
addons
:
...
...
@@ -249,7 +290,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pgsql POSTGRESQL_VERSION=10.0
env
:
DB=pgsql POSTGRESQL_VERSION=10.0
COVERAGE=yes
sudo
:
required
services
:
-
postgresql
...
...
@@ -279,7 +320,7 @@ jobs:
-
bash ./tests/travis/install-postgres-10.sh
-
stage
:
Test
env
:
DB=sqlsrv
env
:
DB=sqlsrv
COVERAGE=yes
sudo
:
required
services
:
-
docker
...
...
@@ -298,7 +339,7 @@ jobs:
-
stage
:
Test
php
:
7.1
env
:
DB=pdo_sqlsrv
env
:
DB=pdo_sqlsrv
COVERAGE=yes
sudo
:
required
services
:
-
docker
...
...
@@ -329,18 +370,6 @@ jobs:
-
composer config minimum-stability dev
-
travis_retry composer update --prefer-dist
-
stage
:
Coverage
php
:
7.1
env
:
DB=sqlite
before_script
:
-
mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
-
if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script
:
-
./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
after_script
:
-
wget https://scrutinizer-ci.com/ocular.phar
-
php ocular.phar code-coverage:upload --format=php-clover clover.xml
-
stage
:
Pull request coding standard
if
:
type = pull_request
php
:
7.1
...
...
tests/travis/sqlite.travis.xml
View file @
c37710b2
...
...
@@ -27,12 +27,6 @@
<listener
class=
"Symfony\Bridge\PhpUnit\SymfonyTestsListener"
/>
</listeners>
<filter>
<whitelist>
<directory
suffix=
".php"
>
./../../lib/Doctrine
</directory>
</whitelist>
</filter>
<groups>
<exclude>
<group>
performance
</group>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment