-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (62 loc) · 2.48 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
language: php
sudo: required
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- dev
- "/^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(-(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\\+[0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*)?$/"
php:
- 7.1
- 7.2
- 7.3
env:
- WP_VERSION=latest WP_MULTISITE=1 TRAVIS_NODE_VERSION="8"
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.yarn-cache"
- node_modules
- vendor
before_install:
- composer self-update
- source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION
- export PATH=$HOME/.yarn/bin:$PATH && travis_retry curl -o- -L https://yarnpkg.com/install.sh
| bash
install:
- node -v && yarn -V
- travis_retry yarn
- composer install -o --prefer-dist --no-interaction
before_script:
- if [[ ${TRAVIS_PHP_VERSION:0:3} != "7.1" ]] && 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 build:production
- yarn run rmdist
- vendor/bin/phpunit --configuration=phpunit.xml
- vendor/bin/phpcs --standard=phpcs.ruleset.xml .
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
- yarn run build:production
- 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: Uq2Ci7DoFAgN2pZl9HvbsOdwFj20WKb9ZGTEwCxlwpkaiIvYRv/qzpyX8IYdn6BopCSLFrkDPHoFBNxTvhouudMsw3UOcJzb9BHEq1yU3VNOZeJOlNODBItA87R7Bi5MaH8uUZk/Fu/+fZSr6oVF0nlyD0WvCME7kkk5Hp9VIGxIuMr0ID3d9m3L/R3MaXcgKk6uVAk4zPFDu4plV4fBCbQB0wqwyRBRLMcdhrh0q5qgA6MAM38d5iyaB7TZ4H2cq0kKtIHhE7uj7Lkgmno4PSM6dzr4yBfBeZcTyK+JHCxPzFUCtEE64u5oGR81ko0ODA+IyoARc/bPOtzDQkw7SgYYeFTqtrrlZMkqWCB684Sqe71gaglBwk6KqRx5R72tceYcadBeXbjUcYK+8yI5DxF+scxbivcHTCBjH4mc+XkmhcR6XcYeR5xegmFoNgqYMGILw6skoY8DEnuUuQm2k38FGFAWGrFnkTKvxa9pZSjECR2zFhS84EGgmjKU73dHWDFti8Av4PcnCwAvQD2rfLMivah4nkudq4zFxB3aSk4r/mQiI0DaUPpmS039DKzZNiHDeH2V9fDSapbKS0o42vPCjQQBtyWyfH6HJmaG6BpFpuKDY/YecleMyxPzdbxWLmkFey5hFCjc2aiNNfTHMsV4ERIIc+Lno1c97GudpxQ=
file: open-sage-$TRAVIS_TAG.zip
on:
tags: true
repo: BCcampus/open-sage
branch: dev