Skip to content

Commit

Permalink
Tweaked CI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
webmozart committed Jan 12, 2016
1 parent dbd3894 commit 46c5895
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 26 deletions.
7 changes: 7 additions & 0 deletions .composer-auth.json
@@ -0,0 +1,7 @@
{
"github-oauth": {
"github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS",
"github.com": "This token is reserved for testing the webmozart/* repositories",
"github.com": "a9debbffdd953ee9b3b82dbc3b807cde2086bb86"
}
}
25 changes: 19 additions & 6 deletions .travis.yml
Expand Up @@ -12,18 +12,31 @@ matrix:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: hhvm
- php: nightly
- php: 7.0
env: COVERAGE=yes
- php: 7.0
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
allow_failures:
- php: hhvm
- php: nightly
fast_finish: true

install: composer update $COMPOSER_FLAGS -n
before_install:
- if [[ $TRAVIS_PHP_VERSION != hhvm && $COVERAGE != yes ]]; then phpenv config-rm xdebug.ini; fi;
- if [[ $TRAVIS_REPO_SLUG = webmozart/path-util ]]; then cp .composer-auth.json ~/.composer/auth.json; fi;
- composer self-update

install: composer update $COMPOSER_FLAGS --prefer-dist --no-interaction

script: if [[ $COVERAGE = yes ]]; then vendor/bin/phpunit --verbose --coverage-clover=coverage.clover; else vendor/bin/phpunit --verbose; fi

script: vendor/bin/phpunit --verbose --coverage-clover=coverage.clover
after_script: if [[ $COVERAGE = yes ]]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

after_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'
notifications:
webhooks:
urls: ['https://webhooks.gitter.im/e/9ccc2378e6c0de6480f8']
on_success: change
on_failure: always
on_start: never
42 changes: 22 additions & 20 deletions appveyor.yml
@@ -1,33 +1,35 @@
build: false
shallow_clone: true
platform: x86
clone_folder: c:\projects\webmozart\path-util

cache:
- '%LOCALAPPDATA%\Composer\files'
- c:\php -> appveyor.yml

init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%

environment:
matrix:
- COMPOSER_FLAGS: ""
- COMPOSER_FLAGS: --prefer-lowest --prefer-stable
- SET PATH=c:\php;%PATH%
- SET COMPOSER_NO_INTERACTION=1
- SET PHP=1

install:
- cinst -y OpenSSL.Light
- cinst -y php
- cd c:\tools\php
- copy php.ini-production php.ini /Y
- echo date.timezone="UTC" >> php.ini
- echo extension_dir=ext >> php.ini
- echo extension=php_openssl.dll >> php.ini
- echo extension=php_mbstring.dll >> php.ini
- echo extension=php_fileinfo.dll >> php.ini
- echo memory_limit=1G >> php.ini
- IF EXIST c:\php (SET PHP=0) ELSE (mkdir c:\php)
- cd c:\php
- IF %PHP%==1 appveyor DownloadFile http://windows.php.net/downloads/releases/archives/php-7.0.0-nts-Win32-VC14-x86.zip
- IF %PHP%==1 7z x php-7.0.0-nts-Win32-VC14-x86.zip -y >nul
- IF %PHP%==1 del /Q *.zip
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- IF %PHP%==1 copy /Y php.ini-development php.ini
- IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- IF %PHP%==1 echo extension_dir=ext >> php.ini
- IF %PHP%==1 echo extension=php_curl.dll >> 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
- appveyor DownloadFile https://getcomposer.org/composer.phar
- cd c:\projects\webmozart\path-util
- php -r "readfile('http://getcomposer.org/installer');" | php
- php composer.phar update %COMPOSER_FLAGS% --no-interaction --no-progress
- mkdir %APPDATA%\Composer
- IF %APPVEYOR_REPO_NAME%==webmozart/path-util copy /Y .composer-auth.json %APPDATA%\Composer\auth.json
- composer update --prefer-dist --no-progress --ansi

test_script:
- cd c:\projects\webmozart\path-util
Expand Down

0 comments on commit 46c5895

Please sign in to comment.