You are here

appveyor.yml in Drupal driver for SQL Server and SQL Azure 3.1.x

File

appveyor.yml
View source
  1. skip_tags: true
  2. init:
  3. - ps: ''
  4. services:
  5. - mssql2016
  6. - iis
  7. image:
  8. - Visual Studio 2017
  9. environment:
  10. matrix:
  11. - TEST_SUITE: core-kernel
  12. - TEST_SUITE: core-extensions-kernel-1
  13. install:
  14. # Set up the Environment
  15. - cmd: mkdir c:\testlogs
  16. # SET UP DATABASE
  17. - ps: powershell .\dev\appveyor\mssql2016.ps1
  18. # SET UP PHP
  19. # is OpenSSL needed?
  20. - 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
  21. - ps: choco install urlrewrite -y --no-progress 2>&1 > C:\TestLogs\choco_install_urlrewrite.txt
  22. - ps: choco install OpenSSL.Light -y --no-progress 2>&1 > C:\TestLogs\choco_install_openssl.txt
  23. - ps: $Env:Path = "C:\Program Files\OpenSSL;" + $Env:Path;
  24. - ps: |
  25. $cli = New-Object Net.WebClient
  26. $cli.Headers['User-Agent'] = 'Appveyor';
  27. $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')
  28. - ps: |
  29. $cli = New-Object Net.WebClient
  30. $cli.Headers['User-Agent'] = 'Appveyor';
  31. $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')
  32. - ps: Expand-Archive -Path 'C:\testlogs\php_pdo_sqlsrv.zip' -Destinationpath 'C:\testlogs\php_pdo_sqlsrv'
  33. - cmd: copy C:\testlogs\php_pdo_sqlsrv\php_pdo_sqlsrv.dll C:\tools\php\ext
  34. - ps: Expand-Archive -Path 'C:\testlogs\php_yaml.zip' -Destinationpath 'C:\testlogs\php_yaml'
  35. - cmd: xcopy C:\testlogs\php_yaml\php_yaml.dll C:\tools\php\ext
  36. # Start Windows Update service
  37. - cmd: sc config wuauserv start= auto
  38. - cmd: net start wuauserv
  39. - ps: (New-Object Net.WebClient).DownloadFile('https://curl.haxx.se/ca/cacert.pem', 'C:\tools\php\cacert.pem')
  40. # Add php binary to PATH
  41. - ps: $Env:Path = "C:\tools\php;" + $Env:Path;
  42. # Edit the php.ini file - Should we have a php.ini.dist file somewhere that we just `cat` into the exiting file?
  43. - ps: Add-Content C:\tools\php\php.ini "extension_dir=ext"
  44. - ps: Add-Content C:\tools\php\php.ini "extension=php_pdo_sqlsrv"
  45. - ps: Add-Content C:\tools\php\php.ini "extension=php_openssl"
  46. - ps: Add-Content C:\tools\php\php.ini "extension=php_mbstring"
  47. - ps: Add-Content C:\tools\php\php.ini "extension=php_curl"
  48. - ps: Add-Content C:\tools\php\php.ini "extension=php_gd2.dll"
  49. - ps: Add-Content C:\tools\php\php.ini 'curl.cainfo="C:\tools\php\cacert.pem"'
  50. - ps: Add-Content C:\tools\php\php.ini 'openssl.cafile="C:\tools\php\cacert.pem"'
  51. # Set up Drupal
  52. # Create a directory for composer and install
  53. - ps: new-item c:\composer -itemtype directory
  54. - cmd: cd /d C:\composer
  55. - cmd: choco install composer --version=4.10.0 -y --no-progress
  56. - ps: refreshenv
  57. - cmd: SET PATH=C:\ProgramData\ComposerSetup\bin;%PATH%
  58. - cmd: composer global require hirak/prestissimo --no-progress
  59. - cmd: cd /d c:\projects
  60. # Create a new drupal project
  61. - cmd: set COMPOSER_MEMORY_LIMIT=-1
  62. - cmd: git clone https://git.drupalcode.org/project/drupal.git -b 8.9.x drupal-project
  63. # Add composer installed binaries to PATH
  64. - cmd: SET PATH=C:\projects\drupal-project\vendor\bin;%PATH%
  65. - cmd: cd /d C:\projects\drupal-project
  66. # Install other composer packages for production
  67. - cmd: composer require symfony/psr-http-message-bridge:1.1.x-dev
  68. # Copy in the module
  69. - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER%\dev\appveyor\TestSuites %APPVEYOR_BUILD_FOLDER%\tests\src\TestSuites
  70. - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER% %cd%\modules\contrib\sqlsrv
  71. - cmd: xcopy /S /I /E /Y %APPVEYOR_BUILD_FOLDER%\drivers %cd%\drivers
  72. - cmd: cd /d C:\projects\drupal-project
  73. - cmd: mkdir C:\projects\drupal-project\sites\simpletest
  74. build_script:
  75. # Override core condition
  76. - 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')
  77. - cmd: git apply 3113403-33.patch
  78. # Logger backtrace incorrect. pushed to 9.x
  79. - 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')
  80. # core Condition not able to be overridden in views...needs work.
  81. - 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')
  82. - cmd: git apply 2867788-92.patch
  83. - cmd: git apply 3130655-10.patch
  84. # Testing-only patches
  85. # directory separator
  86. - 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')
  87. - cmd: git apply 3150731-11.patch
  88. # view sort order bug
  89. - 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')
  90. - cmd: git apply 3146016-3.patch
  91. # Fix format of deprecation notices for phpcs
  92. - 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')
  93. # Add a sqlsrv-specific datatype to test
  94. - 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')
  95. # Enable sqlsrv module in specific kernel tests
  96. - 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')
  97. - cmd: git apply 2966272-16.patch
  98. - cmd: git apply drupal-3111134-database_specific_types-3.patch
  99. - cmd: git apply 3108540-11.patch
  100. before_test:
  101. - cmd: cd C:\projects\drupal-project
  102. - cmd: cd %APPVEYOR_BUILD_FOLDER%
  103. - cmd: cp dev\travis\phpunit.xml.dist C:\projects\drupal-project\core\phpunit.xml
  104. - cmd: mkdir .\build\logs
  105. test_script:
  106. - cmd: cd C:\projects\drupal-project
  107. - cmd: phpunit -vvv -c core\phpunit.xml --testsuite=%TEST_SUITE%