Skip to content

Commit 9298e73

Browse files
author
Felix Arntz
committed
Run extra NPM tests in a dedicated job.
1 parent c1b0b59 commit 9298e73

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

.travis.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ cache:
99
php:
1010
- 5.4
1111
- 5.5
12+
- 5.6
1213
- 7.0
1314
- 7.1
1415
env:
@@ -33,10 +34,8 @@ matrix:
3334
env: WP_VERSION=4.9 WP_MULTISITE=1
3435
- php: 5.6
3536
env: WP_VERSION=4.5 WP_MULTISITE=1
36-
- php: 5.6
37-
env: WP_VERSION=4.9 NPM_TESTS=1
38-
- php: 5.6
39-
env: WP_VERSION=4.5 NPM_TESTS=1
37+
- php: 7.0
38+
env: NPM_TESTS=1
4039
allow_failures:
4140
- php: 5.2
4241

@@ -72,6 +71,15 @@ before_script:
7271
composer install
7372
cd ..
7473
fi
74+
- |
75+
if [[ "$NPM_TESTS" == "1" ]]; then
76+
rm -rf ~/.nvm
77+
git clone https://github.com/creationix/nvm.git ~/.nvm
78+
cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
79+
source ~/.nvm/nvm.sh
80+
nvm install 8
81+
npm install
82+
fi
7583
- PLUGIN_SLUG=$(basename $(pwd))
7684
- export WP_DEVELOP_DIR=/tmp/wordpress/
7785
- git clone --depth=50 --branch="$WP_VERSION" git://develop.git.wordpress.org/ /tmp/wordpress
@@ -85,18 +93,10 @@ before_script:
8593
- mysql -e "CREATE DATABASE wordpress_tests;" -uroot
8694
- cd "/tmp/wordpress/src/wp-content/plugins/$PLUGIN_SLUG"
8795
- phpenv rehash
88-
- |
89-
if [[ "$NPM_TESTS" == "1" ]]; then
90-
rm -rf ~/.nvm
91-
git clone https://github.com/creationix/nvm.git ~/.nvm
92-
cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
93-
source ~/.nvm/nvm.sh
94-
nvm install 8
95-
npm install
96-
fi
9796
script:
98-
- phpunit -c phpunit.xml
9997
- |
10098
if [[ "$NPM_TESTS" == "1" ]]; then
10199
npm test
100+
else
101+
phpunit -c phpunit.xml
102102
fi

0 commit comments

Comments
 (0)