forked from oknoorap/wpcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
54 lines (48 loc) · 1.77 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
# Test against the latest version of this Node.js version
environment:
nodejs_version: "6"
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1 # This var is connected to PHP install cache
- SET ANSICON=121x90 (121x90)
# Install scripts. (runs after repo cloning)
install:
- IF EXIST c:\tools\php (SET PHP=0) # Checks for the PHP install being cached
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern 7.1 | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- 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
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- cd %APPVEYOR_BUILD_FOLDER%
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version
# yarn supports
- yarn install
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
- node_modules
- "%LOCALAPPDATA%/Yarn"
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
- yarn --version
# run tests
- yarn test
# Don't actually build.
build: off
# Branches
branches:
only:
- develop
skip_tags: true