Skip to content

Commit 02af14e

Browse files
committed
move JS tests into a separate branch in travis matrix
this avoids running JS tests for each PHP version.
1 parent 8ea1f51 commit 02af14e

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

.travis.yml

+23-6
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,29 @@ matrix:
5454
services:
5555
- mysql
5656
- postgresql
57+
# have a separate branch for javascript tests
58+
- language: node_js
59+
node_js: 6
60+
dist: trusty
61+
# overwrite php related settings
62+
php:
63+
services:
64+
addons:
65+
install:
66+
- travis_retry npm install
67+
# disable xdebug for performance in composer
68+
- phpenv config-rm xdebug.ini || echo "xdebug is not installed"
69+
- travis_retry composer self-update && composer --version
70+
- travis_retry composer global require "fxp/composer-asset-plugin:^1.2.0"
71+
- travis_retry composer update --prefer-dist --no-interaction
72+
before_script:
73+
- node --version
74+
- npm --version
75+
- php --version
76+
- composer --version
77+
script: npm test
78+
after_script:
79+
5780
allow_failures:
5881
- php: nightly
5982

@@ -86,17 +109,13 @@ install:
86109
- tests/data/travis/apc-setup.sh
87110
- tests/data/travis/memcache-setup.sh
88111
# - tests/data/travis/cubrid-setup.sh
89-
# NPM packages for JS testing
90-
- travis_retry npm install
91112

92113
before_script:
93114
# show some versions and env information
94115
- php -r "echo INTL_ICU_VERSION . \"\n\";"
95116
- php -r "echo INTL_ICU_DATA_VERSION . \"\n\";"
96117
- mysql --version
97118
- psql --version
98-
- node --version
99-
- npm --version
100119

101120
# initialize databases
102121
- mysql -e 'CREATE DATABASE `yiitest`;';
@@ -117,8 +136,6 @@ script:
117136
- cd framework && composer validate --no-check-lock && cd ..
118137
# run PHPUnit
119138
- vendor/bin/phpunit --verbose $PHPUNIT_FLAGS --exclude-group mssql,oci,wincache,xcache,zenddata,cubrid
120-
# run Mocha for JS testing
121-
- npm test
122139

123140
after_script:
124141
- |

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"name": "yii2",
3-
"version": "2.0.10",
43
"description": "a modern PHP framework designed for professional Web development",
54
"main": "index.js",
65
"directories": {

0 commit comments

Comments
 (0)