Skip to content

Instantly share code, notes, and snippets.

@deizel
Forked from Phillaf/travis.yml
Last active October 10, 2015 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deizel/3f1097f49c1d71bb6ba5 to your computer and use it in GitHub Desktop.
Save deizel/3f1097f49c1d71bb6ba5 to your computer and use it in GitHub Desktop.
language: php
php:
- 5.5
- 5.6
- 7.0
sudo: false
env:
global:
- DEFAULT=1
matrix:
fast_finish: true
include:
- php: 5.5
env: COVERALLS=1 DEFAULT=0
- php: 7
env: PHPCS=1 DEFAULT=0
allow_failures:
- env: COVERALLS=1 DEFAULT=0
before_script:
- composer self-update
- composer install --prefer-dist --no-interaction
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
- phpenv rehash
- set +H
script:
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -c .coveralls.yml -v; fi"
notifications:
email: false
before_deploy:
- sh -c "composer require --dev kherge/box && vendor/bin/box build"
deploy:
provider: releases
api_key: "GITHUB OAUTH TOKEN"
file: "apigen.phar"
skip_cleanup: true
on:
tags: true
after_deploy:
- ./update-gh-page.sh
curl -O https://github.com/deizel/manifest-publisher/releases/download/0.1.4/manifest.phar
php manifest.phar publish:gh-pages package-name=ApiGen/ApiGen target-name=apigen/ApiGen.github.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment