This repository has been archived by the owner on May 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
74 lines (66 loc) · 3 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
63
64
65
66
67
68
69
70
71
72
73
74
build: false
platform:
- x86
clone_folder: c:\projects\MinkElectronDriver
environment:
matrix:
- php_ver_target: 7.0.19
nodejs_version: 6
- php_ver_target: 7.0.19
nodejs_version: 7
cache:
- '%LOCALAPPDATA%\Composer\files -> composer.lock'
- composer.phar
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- c:\tools\php -> .appveyor.yml
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1
install:
- cd c:\projects\MinkElectronDriver
- mkdir tmp
# Ensure Windows Update Service is running
- ps: Set-Service wuauserv -StartupType Manual
# Install & set up nodejs
- ps: Install-Product node $env:nodejs_version | Out-File tmp\nodejs-install.log
- npm install --global windows-build-tools > tmp\windows-build-tools.log 2>&1
# Install openssl
- cinst OpenSSL.Light > tmp\openssl-install.log
# Install php
- IF EXIST c:\tools\php (SET PHP=0)
- IF %PHP%==1 cinst --params '"/InstallDir:C:\tools\php"' -i -y php --version %php_ver_target% --force > tmp\php-install.log 2>&1
- IF %PHP%==1 cd c:\tools\php
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
# Install composer
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- IF NOT EXIST composer.phar (appveyor DownloadFile https://getcomposer.org/download/1.3.0/composer.phar)
- composer self-update --no-progress --ansi
# Install project composer dependencies
- cd c:\projects\MinkElectronDriver
- composer install --no-progress --no-ansi > tmp\composer.log 2>&1
before_test:
- ps: $minkServer = Start-Process php -ArgumentList "-S localhost:8002 -t vendor/mink/driver-testsuite/web-fixtures" -PassThru
after_test:
- ps: Stop-Process -Id $minkServer.Id
test_script:
- cd c:\projects\MinkElectronDriver
- vendor/bin/phpunit --colors=always -c phpunit.xml.dist --log-junit tmp\junit-report.xml
on_finish:
# We have logs in appveyor artifacts, so no need to display it
#- php -r "readfile('https://gist.githubusercontent.com/uuf6429/b6df80e2aedd80dd9e5af4cf5575795a/raw/264eaa37db2e56c180977100335f489a6b4d2209/loghighlight.php');" | php -- tmp/electron.log
# Upload logs as artifacts
- appveyor PushArtifact tmp\nodejs-install.log && exit 0
- appveyor PushArtifact tmp\windows-build-tools.log && exit 0
- appveyor PushArtifact tmp\openssl-install.log && exit 0
- IF %PHP%==1 appveyor PushArtifact tmp\php-install.log && exit 0
- appveyor PushArtifact tmp\composer.log && exit 0
- appveyor PushArtifact tmp\electron.log && exit 0
# Upload test results report
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tmp\junit-report.xml))