Skip to content

Commit 9d4765d

Browse files
authored
Merge pull request #26 from leanphp/appveyor
appveyor: add PHP 7.0,7.1,7.2 test matrixes + update build/test
2 parents 08678bb + 7462344 commit 9d4765d

File tree

8 files changed

+70
-33
lines changed

8 files changed

+70
-33
lines changed

.appveyor.yml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,27 @@ build: false
33
shallow_clone: false
44
platform: x64
55
clone_folder: c:\projects\behat-code-coverage
6+
pull_requests:
7+
do_not_increment_build_number: true
68

79
environment:
8-
PHP_DOWNLOAD_FILE: 'php-7.1.2-nts-Win32-VC14-x86.zip'
10+
COMPOSER_ROOT_VERSION: '7.0-dev'
11+
matrix:
12+
- PHP_VERSION: '7.2.0-Win32-VC15-x86'
13+
DEPENDENCIES: ''
14+
XDEBUG_VERSION: '2.6.0-7.2-vc15'
15+
- PHP_VERSION: '7.2.0-Win32-VC15-x86'
16+
DEPENDENCIES: '--prefer-lowest'
17+
XDEBUG_VERSION: '2.6.0-7.2-vc15'
18+
- PHP_VERSION: '7.1.12-Win32-VC14-x86'
19+
DEPENDENCIES: ''
20+
XDEBUG_VERSION: '2.6.0-7.1-vc14'
21+
- PHP_VERSION: '7.1.12-Win32-VC14-x86'
22+
DEPENDENCIES: '--prefer-lowest'
23+
XDEBUG_VERSION: '2.6.0-7.1-vc14'
24+
25+
matrix:
26+
fast_finish: true
927

1028
#branches:
1129
#only:
@@ -14,40 +32,47 @@ environment:
1432
skip_commits:
1533
message: /\[ci skip\]/
1634

17-
#cache:
18-
#- c:\php -> appveyor.yml
19-
#- c:\php\composer.bat
35+
cache:
36+
- c:\php -> appveyor.yml
37+
- '%LOCALAPPDATA%\Composer\files'
2038

2139
init:
22-
- SET PATH=c:\php;%PATH%
40+
- SET PATH=c:\php\%PHP_VERSION%;%PATH%
2341
- SET COMPOSER_NO_INTERACTION=1
2442
- SET PHP=1
2543
- SET ANSICON=121x90 (121x90)
2644
- git config --global core.autocrlf input
2745

2846
install:
29-
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
30-
- cd c:\php
31-
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/%PHP_DOWNLOAD_FILE%
32-
- IF %PHP%==1 7z x %PHP_DOWNLOAD_FILE% -y > 7z.log
33-
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
34-
- appveyor DownloadFile https://getcomposer.org/composer.phar
35-
- copy php.ini-production php.ini /Y
36-
- echo date.timezone="UTC" >> php.ini
37-
- echo extension_dir=ext >> php.ini
38-
- echo extension=php_openssl.dll >> php.ini
39-
- echo extension=php_curl.dll >> php.ini
40-
- echo extension=php_mbstring.dll >> php.ini
41-
- echo extension=php_fileinfo.dll >> php.ini
42-
# Xdebug
43-
- IF %PHP%==1 appveyor DownloadFile https://xdebug.org/files/php_xdebug-2.5.1-7.1-vc14-nts-x86_64.dll
44-
- mv php_xdebug-2.5.1-7.1-vc14-nts-x86_64.dll ext\
45-
- echo zend_extension="php_xdebug-2.5.1-7.1-vc14-nts-x86_64.dll" >> php.ini
47+
- IF NOT EXIST c:\php mkdir c:\php
48+
- IF NOT EXIST c:\php\%PHP_VERSION% mkdir c:\php\%PHP_VERSION%
49+
- cd c:\php\%PHP_VERSION%
50+
- IF NOT EXIST php-installed.txt curl -fsS -o php-%PHP_VERSION%.zip https://windows.php.net/downloads/releases/archives/php-%PHP_VERSION%.zip
51+
- IF NOT EXIST php-installed.txt 7z x php-%PHP_VERSION%.zip -y >nul
52+
- IF NOT EXIST php-installed.txt del /Q *.zip
53+
- IF NOT EXIST php-installed.txt copy /Y php.ini-development php.ini
54+
- IF NOT EXIST php-installed.txt echo max_execution_time=1200 >> php.ini
55+
- IF NOT EXIST php-installed.txt echo date.timezone="UTC" >> php.ini
56+
- IF NOT EXIST php-installed.txt echo extension_dir=ext >> php.ini
57+
- IF NOT EXIST php-installed.txt echo extension=php_curl.dll >> php.ini
58+
- IF NOT EXIST php-installed.txt echo extension=php_openssl.dll >> php.ini
59+
- IF NOT EXIST php-installed.txt echo extension=php_mbstring.dll >> php.ini
60+
- IF NOT EXIST php-installed.txt echo extension=php_fileinfo.dll >> php.ini
61+
- IF NOT EXIST php-installed.txt echo extension=php_mysqli.dll >> php.ini
62+
- IF NOT EXIST php-installed.txt echo extension=php_pdo_sqlite.dll >> php.ini
63+
- IF NOT EXIST php-installed.txt echo zend.assertions=1 >> php.ini
64+
- IF NOT EXIST php-installed.txt echo assert.exception=On >> php.ini
65+
- IF NOT EXIST php-installed.txt appveyor DownloadFile https://getcomposer.org/composer.phar
66+
- IF NOT EXIST php-installed.txt echo @php %%~dp0composer.phar %%* > composer.bat
67+
- IF NOT EXIST php-installed.txt type nul >> php-installed.txt
68+
- IF %PHP%==1 appveyor DownloadFile https://xdebug.org/files/php_xdebug-%XDEBUG_VERSION%.dll
69+
- mv php_xdebug-%XDEBUG_VERSION%.dll ext\
70+
- echo zend_extension="php_xdebug-%XDEBUG_VERSION%.dll" >> php.ini
4671
- echo xdebug.remote_enable=true >> php.ini
4772
- echo xdebug.remote_autostart=true >> php.ini
4873
- cd c:\projects\behat-code-coverage
4974
- composer self-update
50-
- composer install --no-progress --ansi
75+
- composer update --no-progress --no-ansi --no-interaction --no-suggest --optimize-autoloader --prefer-stable %DEPENDENCIES%
5176

5277
test_script:
5378
- cd c:\projects\behat-code-coverage

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ language: php
22

33
matrix:
44
include:
5-
- php: 5.6
6-
- php: 5.6
7-
env: deps=low
85
- php: 7.0
6+
- php: 7.0
7+
deps: low
8+
- php: 7.1
99
- php: 7.1
10+
deps: low
11+
- php: 7.2
1012
- php: 7.2
13+
deps: low
1114

1215
before_script:
1316
- composer validate

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ documented in this file.
66
The format is based on [Keep a Changelog](http://keepachangelog.com/)
77
and this project adheres to [Semantic Versioning](http://semver.org/).
88

9+
## 3.x-dev
10+
11+
- `phpunit/php-code-coverage` dependency version requirement has been updated
12+
from `~4.0|~5.0` to `~5.0` as we do not support version `4.0` anymore.
13+
14+
915
## [3.2.0] - 2017-10-17 - Guzzle 6.0 support release
1016

1117
- Updated `guzzlehttp/guzzle` requirement from `~4.0||~5.0` to `~6.0`. We are

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"require": {
2828
"php": ">=5.6",
29-
"phpunit/php-code-coverage": "~4.0||~5.0",
29+
"phpunit/php-code-coverage": "~5.0",
3030
"behat/behat": "~3.0",
3131
"guzzlehttp/guzzle": "~6.0",
3232
"symfony/config": "~2.3||~3.0||~4.0",
@@ -36,7 +36,7 @@
3636
"symfony/http-foundation": "~2.3||~3.0||~4.0"
3737
},
3838
"require-dev": {
39-
"phpunit/phpunit": "~5.0",
39+
"phpunit/phpunit": "~6.0",
4040
"mikey179/vfsStream": "1.6.*"
4141
},
4242
"suggest": {

src/Common/Report/Xml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(array $options)
4242
$options['target'] = null;
4343
}
4444

45-
$this->report = new Facade(array());
45+
$this->report = new Facade('');
4646
$this->options = $options;
4747
}
4848

tests/Common/Report/XmlTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public function testProcess()
4747
try {
4848
$result = $report->process($coverage);
4949
} catch (\Exception $e) {
50-
print_r($e->getMessage());
50+
echo 'aaaa';
51+
echo($e->getMessage());
5152
$this->fail();
5253
}
5354
}

tests/Service/ReportServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Report service test
1515
*
1616
* @group Unit
17-
*/
17+
*
1818
class ReportServiceTest extends TestCase
1919
{
2020
public function __construct()
@@ -55,4 +55,4 @@ public function testGenerateReport()
5555
$service = new ReportService(array('report' => array('format' => 'html', 'options' => array())), $factory);
5656
$service->generateReport($coverage);
5757
}
58-
}
58+
}*/

tests/VIPSoft/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88

99
namespace VIPSoft;
1010

11+
use PHPUnit\Framework\TestCase as BaseTestCase;
12+
1113
/**
1214
* Test case
1315
*
1416
* @author Anthon Pang <[email protected]>
1517
*/
16-
class TestCase extends \PHPUnit_Framework_TestCase
18+
class TestCase extends BaseTestCase
1719
{
1820
/**
1921
* @var array

0 commit comments

Comments
 (0)