forked from diff-sniffer/diff-sniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
62 lines (53 loc) · 2.03 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
build: false
branches:
only:
- 0.5.x
platform:
- x64
clone_folder: C:\projects\diff-sniffer
clone_depth: 1
cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\tools\php74 -> .appveyor.yml
- C:\tools\composer -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files -> composer.json'
init:
- SET ANSICON=121x90 (121x90)
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php74;C:\tools\composer;%PATH%
install:
- sc config wuauserv start=auto
- net start wuauserv
- ps: |
if (!(Test-Path C:\tools\php74)) {
cinst -y --no-progress php --version 7.4.5
# Download and unpack extensions
cd $env:temp
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/pcov/stable.txt").Content
Invoke-WebRequest https://windows.php.net/downloads/pecl/releases/pcov/$($DLLVersion)/php_pcov-$($DLLVersion)-7.4-nts-vc15-$($env:platform).zip -OutFile pcov.zip
7z x -y pcov.zip > $null
copy php_pcov.dll C:\tools\php74\ext
# Configure PHP
cd C:\tools\php74
copy php.ini-production php.ini
Add-Content php.ini "`n date.timezone=UTC"
Add-Content php.ini "`n extension_dir=ext"
Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_pcov.dll"
}
if (!(Test-Path C:\tools\composer)) {
New-Item -path C:\tools -name composer -itemtype directory
}
if (!(Test-Path C:\tools\composer\composer.phar)) {
cd C:\tools\composer
php -r "readfile('http://getcomposer.org/installer');" | php
Set-Content -path 'composer.bat' -Value ('@php "%~dp0composer.phar" %*')
}
- cd C:\projects\diff-sniffer
- composer install --no-interaction --no-progress --prefer-dist
test_script:
- vendor\bin\phpunit --coverage-clover=coverage.xml
on_success:
- appveyor DownloadFile https://codecov.io/bash -FileName codecov.sh
- bash codecov.sh -f coverage.xml