66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
language: php
|
|
sudo: required
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
on_failure: change
|
|
branches:
|
|
only:
|
|
- dev
|
|
- "/\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
|
|
php:
|
|
- 7.0.8
|
|
- 7.1
|
|
- 7.2
|
|
- nightly
|
|
env:
|
|
- WP_VERSION=latest WP_MULTISITE=1 TRAVIS_NODE_VERSION="8"
|
|
matrix:
|
|
fast_finish: true
|
|
allow_failures:
|
|
- php: nightly
|
|
cache:
|
|
apt: true
|
|
directories:
|
|
- "$HOME/.composer/cache"
|
|
- node_modules
|
|
- vendor
|
|
before_install:
|
|
- source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION
|
|
install:
|
|
- node -v
|
|
- npm install -g yarn
|
|
- yarn
|
|
- composer install
|
|
- ulimit -n 4096
|
|
before_script:
|
|
- if php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi
|
|
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
|
|
script:
|
|
- yarn run lint
|
|
- yarn run production
|
|
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then phpdbg -qrr -d memory_limit=-1 vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml; fi
|
|
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]]; then vendor/bin/phpunit --configuration phpunit.xml; fi
|
|
- vendor/bin/phpcs --standard=phpcs.ruleset.xml *.php inc/ bin/
|
|
after_success:
|
|
- bash <(curl -s https://codecov.io/bash)
|
|
# before_deploy:
|
|
# - export TRAVIS_PROJECT_SLUG="$(basename $TRAVIS_BUILD_DIR)"
|
|
# - curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
# - chmod +x wp-cli.phar
|
|
# - sudo mv wp-cli.phar /usr/local/bin/wp
|
|
# - wp package install wp-cli/dist-archive-command
|
|
# - composer install --no-dev --optimize-autoloader
|
|
# - cd ../
|
|
# - wp dist-archive $TRAVIS_PROJECT_SLUG $TRAVIS_BUILD_DIR/$TRAVIS_PROJECT_SLUG-$TRAVIS_TAG.zip
|
|
# - cd $TRAVIS_BUILD_DIR
|
|
# deploy:
|
|
# provider: releases
|
|
# skip_cleanup: true
|
|
# api_key:
|
|
# secure:
|
|
# file: "roe-pressbooks-$TRAVIS_TAG.zip"
|
|
# on:
|
|
# tags: true
|
|
# repo: villa7/roe-pressbooks
|