Skip to content

Instantly share code, notes, and snippets.

@Phillaf
Last active October 10, 2015 23:35
Show Gist options
  • Save Phillaf/36a31f0032e2d4adf73b to your computer and use it in GitHub Desktop.
Save Phillaf/36a31f0032e2d4adf73b 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 http://www.chrispliakas.com/manifest-publisher/download/latest/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