forked from pressbooks/pressbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (72 loc) · 3.41 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: php
sudo: required
notifications:
email:
on_success: never
on_failure: change
slack:
secure: rU9lNAFWwyC9dEWcg9KTx6DoBdXOEM1iCkUIWFnzQoz3QYnZ2yidBhnzEMeGbEVkOqqOaTQUtB6q93WsOwTP7tgooWlWD4F7X64uoD/Ze4/q4lqfpP0wREQvakbb1+cv//LAbzDDvmKkkMF+UFNfzDKDMGCGaQGPhfMxYH0Dtu5fo1ZLg1G0pM5FvV04qfsazHFK3zhgMOru292Z0njpFygsuqHqUP3G1yyA9cXYDCmNQUYTnqFl79b6HXGbMhZApisloqn7aetSFqIg/vx0fhY8MKQ1aD/4YvdMoaKnaW/LZdcXM/pHjKaOtitsWaNPefRx9c+8gguR4RHLjTBlBgGF0P0D0wSuz1X2oHrK69s7NhLxw+uc1AUmlNpMmROS1zJFsNBkiOpcVxvl92KRgHBtEo2vEQWv+aDyKPh01hjLsdgxlH6hVZj45zHwEam/mjnXRBD9MO9JX+cVl+XsE+7+jyq93sbnHq8HUqcddZqehanqG5TQirll7f6Rnkt0H8jpM57khm5t86gnBEAHfy7cX/oAZxIs5WM8uNLA/y4PGPPZ9ft6vOhrx18ALuaMO87sul6tnmO9F2qefd3FS4wToVNQyoj8w6aAOK4nqLdj0NFKFZYyPwpwm2G/cQ5P9K/37y/kJ0Z1TGbwn6+q0siRYqaBeon9qOvg2k49n7A=
branches:
only:
- dev
- next
- "/\\d+\\.\\d+(\\.\\d+)?(-\\S*)?$/"
php:
- 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:
- sudo apt-get -qq update
- sudo apt-get install -y epubcheck libxml2-utils ghostscript imagemagick poppler-utils
- wget https://www.princexml.com/download/prince_11.3-1_ubuntu14.04_amd64.deb
- sudo dpkg -i prince_11.3-1_ubuntu14.04_amd64.deb
- rm prince_11.3-1_ubuntu14.04_amd64.deb
- 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 build: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: O8wcQCzxudvUei0TVfVHOEwkB4kVI6AgPHggIkefDx0ag0wJOk/Rhr5imf6h57R1mQGLYgmc/ZbHM5j9/mk5eIxFBURWJi5OElVXN3EmPvioFsSaUsgFfpXaagy3Ks6emNIs3X7D6HHmf6h9sZ1tmSPTnPAm9AlgxbSJ3Va+t1P5PJBVODO/XpXDLh8YAfETJVEoPHiArUIDGZW6YbAjXOxpJn3cHydr/l1uKAhHKDIh90CTCvI3IMxLF5g/lUXefVkku0Dg3mbMBHhHGY5Ux3IDt7NcKJUAN7Y/n1rp48P3BIDVmmcf5soHUlFkwVgTyuH21mEpq26vsVnuHCTWNEo/ghnlJkYF0Wv6YMlf9ZrWnEjtPYZ2GZPCGkSzTTWANovj77Fwcdw7SErXOoEogS8bnbX8zRav2Dhz9Jvm0Jnsp98/OOUXE22+WsTvLpF+lT0ZtpjxlAB8cF62H0ON1u4xA6OJRKcJM00gn8991e+VJdd66Srdj9AXwFKA8QPc/DJLUTI4LE7qEFsjx1c0BfAL7mIi00+bgLjwtTOSC34ZKR/kTrWUIkTQtfhJhPVw+0SBWlP/wloKCzpCkXgM7kEcECzxi1GgdR7odXUdEqRos5KaGk53ABX82NFHT8rlQJWqgW+Rxlr2aSc3QU78JotN7qbFl9VNlSrTlneExq0=
file: "pressbooks-$TRAVIS_TAG.zip"
on:
tags: true
repo: pressbooks/pressbooks