View source
- skip_tags: true
- init:
- - ps: ''
- services:
- - mssql2016
- - iis
- image:
- - Visual Studio 2017
- environment:
- matrix:
- - TEST_SUITE: core-kernel
- - TEST_SUITE: core-extensions-kernel-1
- install:
- # Set up the Environment
- - cmd: mkdir c:\testlogs
- # SET UP DATABASE
- - ps: powershell .\dev\appveyor\mssql2016.ps1
- # SET UP PHP
- # is OpenSSL needed?
- - ps: choco install php --version=7.3.12 --package-parameters="/InstallDir:C:\tools\php" -y --no-progress 2>&1 > C:\TestLogs\choco_install_php.txt
- - ps: choco install urlrewrite -y --no-progress 2>&1 > C:\TestLogs\choco_install_urlrewrite.txt
- - ps: choco install OpenSSL.Light -y --no-progress 2>&1 > C:\TestLogs\choco_install_openssl.txt
- - ps: $Env:Path = "C:\Program Files\OpenSSL;" + $Env:Path;
- - ps: |
- $cli = New-Object Net.WebClient
- $cli.Headers['User-Agent'] = 'Appveyor';
- $cli.DownloadFile('https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/5.8.1/php_pdo_sqlsrv-5.8.1-7.3-nts-vc15-x64.zip', 'C:\testlogs\php_pdo_sqlsrv.zip')
- - ps: |
- $cli = New-Object Net.WebClient
- $cli.Headers['User-Agent'] = 'Appveyor';
- $cli.DownloadFile('http://windows.php.net/downloads/pecl/releases/yaml/2.1.0/php_yaml-2.1.0-7.3-nts-vc15-x64.zip', 'C:\testlogs\php_yaml.zip')
- - ps: Expand-Archive -Path 'C:\testlogs\php_pdo_sqlsrv.zip' -Destinationpath 'C:\testlogs\php_pdo_sqlsrv'
- - cmd: copy C:\testlogs\php_pdo_sqlsrv\php_pdo_sqlsrv.dll C:\tools\php\ext
- - ps: Expand-Archive -Path 'C:\testlogs\php_yaml.zip' -Destinationpath 'C:\testlogs\php_yaml'
- - cmd: xcopy C:\testlogs\php_yaml\php_yaml.dll C:\tools\php\ext
- # Start Windows Update service
- - cmd: sc config wuauserv start= auto
- - cmd: net start wuauserv
- - ps: (New-Object Net.WebClient).DownloadFile('https://curl.haxx.se/ca/cacert.pem', 'C:\tools\php\cacert.pem')
- # Add php binary to PATH
- - ps: $Env:Path = "C:\tools\php;" + $Env:Path;
- # Edit the php.ini file - Should we have a php.ini.dist file somewhere that we just `cat` into the exiting file?
- - ps: Add-Content C:\tools\php\php.ini "extension_dir=ext"
- - ps: Add-Content C:\tools\php\php.ini "extension=php_pdo_sqlsrv"
- - ps: Add-Content C:\tools\php\php.ini "extension=php_openssl"
- - ps: Add-Content C:\tools\php\php.ini "extension=php_mbstring"
- - ps: Add-Content C:\tools\php\php.ini "extension=php_curl"
- - ps: Add-Content C:\tools\php\php.ini "extension=php_gd2.dll"
- - ps: Add-Content C:\tools\php\php.ini 'curl.cainfo="C:\tools\php\cacert.pem"'
- - ps: Add-Content C:\tools\php\php.ini 'openssl.cafile="C:\tools\php\cacert.pem"'
- # Set up Drupal
- # Create a directory for composer and install
- - ps: new-item c:\composer -itemtype directory
- - cmd: cd /d C:\composer
- - cmd: choco install composer --version=4.10.0 -y --no-progress
- - ps: refreshenv
- - cmd: SET PATH=C:\ProgramData\ComposerSetup\bin;%PATH%
- - cmd: composer global require hirak/prestissimo --no-progress
- - cmd: cd /d c:\projects
- # Create a new drupal project
- - cmd: set COMPOSER_MEMORY_LIMIT=-1
- - cmd: git clone https://git.drupalcode.org/project/drupal.git -b 8.9.x drupal-project
- # Add composer installed binaries to PATH
- - cmd: SET PATH=C:\projects\drupal-project\vendor\bin;%PATH%
- - cmd: cd /d C:\projects\drupal-project
- # Install other composer packages for production
- - cmd: composer require symfony/psr-http-message-bridge:1.1.x-dev
- # Copy in the module
- - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER%\dev\appveyor\TestSuites %APPVEYOR_BUILD_FOLDER%\tests\src\TestSuites
- - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER% %cd%\modules\contrib\sqlsrv
- - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER%\drivers %cd%\drivers
- - cmd: cd /d C:\projects\drupal-project
- - cmd: mkdir C:\projects\drupal-project\sites\simpletest
- build_script:
- # Override core condition
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-03-10/3113403-33.patch', 'C:\projects\drupal-project\3113403-33.patch')
- - cmd: git apply 3113403-33.patch
- # Logger backtrace incorrect. pushed to 9.x
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-05-27/2867788-92.patch', 'C:\projects\drupal-project\2867788-92.patch')
- # core Condition not able to be overridden in views...needs work.
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-05-04/3130655-10.patch', 'C:\projects\drupal-project\3130655-10.patch')
- - cmd: git apply 2867788-92.patch
- - cmd: git apply 3130655-10.patch
- # Testing-only patches
- # directory separator
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-06-11/3150731-11.patch', 'C:\projects\drupal-project\3150731-11.patch')
- - cmd: git apply 3150731-11.patch
- # view sort order bug
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-06-05/3146016-3.patch', 'C:\projects\drupal-project\3146016-3.patch')
- - cmd: git apply 3146016-3.patch
- # Fix format of deprecation notices for phpcs
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-02-25/3108540-11.patch', 'C:\projects\drupal-project\3108540-11.patch')
- # Add a sqlsrv-specific datatype to test
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-02-05/drupal-3111134-database_specific_types-3.patch', 'C:\projects\drupal-project\drupal-3111134-database_specific_types-3.patch')
- # Enable sqlsrv module in specific kernel tests
- - ps: (New-Object Net.WebClient).DownloadFile('https://www.drupal.org/files/issues/2020-05-02/2966272-16.patch', 'C:\projects\drupal-project\2966272-16.patch')
- - cmd: git apply 2966272-16.patch
- - cmd: git apply drupal-3111134-database_specific_types-3.patch
- - cmd: git apply 3108540-11.patch
- before_test:
- - cmd: cd C:\projects\drupal-project
- - cmd: cd %APPVEYOR_BUILD_FOLDER%
- - cmd: cp dev\travis\phpunit.xml.dist C:\projects\drupal-project\core\phpunit.xml
- - cmd: mkdir .\build\logs
- test_script:
- - cmd: cd C:\projects\drupal-project
- - cmd: phpunit -vvv -c core\phpunit.xml --testsuite=%TEST_SUITE%