Created
February 14, 2019 15:00
-
-
Save icanhazstring/11d842c560242c60e0efd8e64ab2753a to your computer and use it in GitHub Desktop.
Enable Travis PHP Build on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default os is linux | |
matrix: | |
include: | |
- language: php | |
php: 7.2 | |
before_script: | |
- composer install | |
after_script: | |
- sh .travis.coverage.sh | |
env: | |
- COVERAGE_FLAGS="--coverage-text --coverage-clover=clover.xml" | |
- name: "PHP: 7.2" | |
language: sh | |
os: windows | |
before_script: | |
# Use chocolatey to install certain php version | |
# Skipp --version to install latest stable release | |
- choco install php --version 7.2.15 --package-parameters='"/InstallDir:C:\php"' | |
# Export windows path into unix path | |
- export PATH=/c/php:$PATH | |
# Enable openssl used by composer | |
- sed -i 's/;extension=openssl/extension=openssl/g' /c/php/php.ini | |
# Enable mbstring used by phpunit | |
- sed -i 's/;extension=mbstring/extension=mbstring/g' /c/php/php.ini | |
# | |
# You might want to enable other extensions as needed ... | |
# | |
# Fetch composer | |
- wget http://getcomposer.org/composer.phar | |
# Install dependencies | |
- php composer.phar install | |
allow_failures: | |
- php: nightly | |
script: | |
- vendor/bin/phpunit --verbose ${COVERAGE_FLAGS} --colors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment