Skip to content

Instantly share code, notes, and snippets.

@icanhazstring
Created February 14, 2019 15:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icanhazstring/11d842c560242c60e0efd8e64ab2753a to your computer and use it in GitHub Desktop.
Save icanhazstring/11d842c560242c60e0efd8e64ab2753a to your computer and use it in GitHub Desktop.
Enable Travis PHP Build on Windows
# 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