File tree Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Expand file tree Collapse file tree 3 files changed +56
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ internals.detectFromTravisYaml = (travisYaml) => {
21
21
22
22
for ( const env of travisYaml . env . matrix ) {
23
23
24
- const matches = env . match ( / (?: N O D E J S _ V E R | T R A V I S _ N O D E _ V E R S I O N ) = " ? ( n o d e \/ ) ? (?< version > [ \w . / * ] + ) " ? / ) ; /* hack syntax highlighter 🤦♂️ */
24
+ const matches = env . match ( / (?: N O D E J S _ V E R | T R A V I S _ N O D E _ V E R S I O N | N O D E _ V E R ) = " ? ( n o d e \/ ) ? (?< version > [ \w . / * ] + ) " ? / ) ; /* hack syntax highlighter 🤦♂️ */
25
25
26
26
raw . add ( matches . groups . version ) ;
27
27
}
Original file line number Diff line number Diff line change
1
+ # Source: https://github.com/ReactiveX/rxjs/blob/ef88ded3d671f48466ea3a42f9a2af656bd51d36/.travis.yml
2
+
3
+ language : node_js
4
+ sudo : false
5
+
6
+ addons :
7
+ sauce_connect :
8
+ # Update SAUCE_USERNAME / SAUCE_ACCESS_KEY in travis if necessary
9
+ # https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings
10
+ sauce_connect : true
11
+
12
+ cache :
13
+ directories :
14
+ - node_modules
15
+
16
+ env :
17
+ matrix :
18
+ - NODE_VER=4 FULL_VALIDATE=false
19
+ - NODE_VER=6 FULL_VALIDATE=true alias grunt=./node_modules/grunt-cli/bin/grunt
20
+ - NODE_VER=7 FULL_VALIDATE=false
21
+ matrix :
22
+ fast_finish : true
23
+
24
+ before_install :
25
+ - nvm install $NODE_VER
26
+ - npm install -g npm@4 && npm install -g npx && node -v && npm -v
27
+ -
if [ "$FULL_VALIDATE" == "true" ]; then npm install [email protected] grunt-cli grunt-contrib-connect grunt-run; fi
28
+
29
+ install :
30
+ - npm install
31
+ - if [ "$FULL_VALIDATE" == "true" ]; then npm run lint && npm run check_circular_dependencies; fi
32
+
33
+ script :
34
+ - if [ "$FULL_VALIDATE" == "true" ] && [ -n "DANGER_GITHUB_API_TOKEN" ]; then echo {} > ./.babelrc && npx danger; fi
35
+ - npm run build_spec && npm run test_mocha && node ./node_modules/markdown-doctest/bin/cmd.js
36
+
37
+ after_success :
38
+ - if [ "$FULL_VALIDATE" == "true" ]; then npm run cover && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi
39
+ - if [ "$FULL_VALIDATE" == "true" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "$SAUCE_ACCESS_KEY" ]; then npm run build_spec_browser && grunt --gruntfile spec/support/mocha.sauce.gruntfile.js; fi
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ describe('node-support', () => {
48
48
49
49
describe ( 'path' , ( ) => {
50
50
51
- it ( 'returns node versions from iamitcs-nodejs-nan .yml at the path' , async ( ) => {
51
+ it ( 'returns node versions from .travis .yml at the path' , async ( ) => {
52
52
53
53
const path = Path . join ( __dirname , '..' ) ;
54
54
@@ -107,6 +107,21 @@ describe('node-support', () => {
107
107
}
108
108
} ) ;
109
109
} ) ;
110
+
111
+ it ( 'returns node versions from matrix env vars (NODE_VER)' , async ( ) => {
112
+
113
+ const path = internals . prepareFixture ( 'reactivex-rxjs.yml' ) ;
114
+
115
+ const result = await NodeSupport . detect ( { path } ) ;
116
+
117
+ expect ( result ) . to . equal ( {
118
+ name : 'test-module' ,
119
+ version : '0.0.0-development' ,
120
+ travis : {
121
+ raw : [ '4' , '6' , '7' ]
122
+ }
123
+ } ) ;
124
+ } ) ;
110
125
} ) ;
111
126
} ) ;
112
127
} ) ;
You can’t perform that action at this time.
0 commit comments