-
-
Notifications
You must be signed in to change notification settings - Fork 388
/
.appveyor.yml
64 lines (55 loc) · 2.24 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
build: false
platform:
- x64
clone_folder: C:\projects\migrations
clone_depth: 1
cache:
- C:\ProgramData\chocolatey\bin -> .appveyor.yml
- C:\ProgramData\chocolatey\lib -> .appveyor.yml
- C:\tools\php -> .appveyor.yml
- C:\tools\composer -> .appveyor.yml
- '%LOCALAPPDATA%\Composer\files -> composer.json'
environment:
matrix:
- php: 8.1.4
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;C:\tools\composer;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET ANSICON=121x90 (121x90)
## Install PHP and composer, and run the appropriate composer command
install:
- ps: |
# Check if installation is cached
if (!(Test-Path c:\tools\php)) {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --no-progress --ignore-checksums -y php --version $env:php
# install sqlite
appveyor-retry cinst -y sqlite --no-progress
Get-ChildItem -Path c:\tools\php
cd c:\tools\php
# Set PHP environment items that are always needed
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 memory_limit=1G"
Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
Add-Content php.ini "`n extension=php_curl.dll"
}
- ps: |
# download Composer
if (!(Test-Path C:\tools\composer)) {
New-Item -path c:\tools -name composer -itemtype directory
}
if (!(Test-Path c:\tools\composer\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar -Filename C:\tools\composer\composer.phar
Set-Content -path 'C:\tools\composer\composer.bat' -Value ('@php C:\tools\composer\composer.phar %*')
}
# install composer dependencies
- cd C:\projects\migrations
- appveyor-retry composer self-update
- appveyor-retry composer update --no-progress --prefer-dist
test_script:
- vendor\bin\phpunit