@@ -42,8 +42,10 @@ addons:
42
42
before_install :
43
43
# prevents windows error: npm ERR! ... git-sh-setup: file not found
44
44
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
45
+ # only run jobs in packages that have changed since master in PR builds
46
+ - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export RUN_SINCE='--since master' ; fi
45
47
46
- script : npx nyc -s npm run test:node -- -- -- --timeout 10000 --bail
48
+ script : npx nyc -s npm run test:node -- $RUN_SINCE -- -- --timeout 10000 --bail
47
49
after_success :
48
50
- npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
49
51
@@ -60,77 +62,77 @@ jobs:
60
62
include :
61
63
- stage : check
62
64
script :
63
- - npm run build -- --scope={ipfs,ipfs-http-client} -- -- --bundlesize
64
- - npm run dep-check -- -- -- -- -i wrtc -i electron-webrtc
65
- - npm run lint -- --concurrency 1
65
+ - npm run build -- $RUN_SINCE --scope={ipfs,ipfs-http-client} -- -- --bundlesize
66
+ - npm run dep-check -- $RUN_SINCE -- -- -- -i wrtc -i electron-webrtc
67
+ - npm run lint -- $RUN_SINCE --concurrency 1
66
68
67
69
- stage : test
68
70
name : chrome
69
71
addons :
70
72
chrome : stable
71
73
script :
72
- - npm run test:browser -- -- -- --bail
74
+ - npm run test:browser -- $RUN_SINCE -- -- --bail
73
75
74
76
- stage : test
75
77
name : chrome webworker
76
78
addons :
77
79
chrome : stable
78
80
script :
79
- - npm run test:webworker -- -- -- --bail
81
+ - npm run test:webworker -- $RUN_SINCE -- -- --bail
80
82
81
83
- stage : test
82
84
name : firefox
83
85
addons :
84
86
firefox : latest
85
87
script :
86
- - npm run test:browser -- -- -- --bail --browsers FirefoxHeadless
88
+ - npm run test:browser -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
87
89
88
90
- stage : test
89
91
name : firefox webworker
90
92
addons :
91
93
firefox : latest
92
94
script :
93
- - npm run test:webworker -- -- -- --bail --browsers FirefoxHeadless
95
+ - npm run test:webworker -- $RUN_SINCE -- -- --bail --browsers FirefoxHeadless
94
96
95
97
- stage : test
96
98
name : electron-main
97
99
os : osx
98
100
script :
99
- - npm run test:electron-main -- -- -- --bail
101
+ - npm run test:electron-main -- $RUN_SINCE -- -- --bail
100
102
101
103
- stage : test
102
104
name : electron-renderer
103
105
os : osx
104
106
script :
105
- - npm run test:electron-renderer -- -- -- --bail
107
+ - npm run test:electron-renderer -- $RUN_SINCE -- -- --bail
106
108
107
109
- stage : test
108
110
name : interop - node
109
111
script :
110
- - npm run test:interop:node -- -- -- --bail
112
+ - npm run test:interop:node -- $RUN_SINCE -- -- --bail
111
113
112
114
- stage : test
113
115
name : interop - browser
114
116
script :
115
- - npm run test:interop:browser -- -- -- --bail
117
+ - npm run test:interop:browser -- $RUN_SINCE -- -- --bail
116
118
117
119
- stage : test
118
120
name : interop - electron-main
119
121
os : osx
120
122
script :
121
- - npm run test:interop:electron-main -- -- -- --bail --timeout 10000
123
+ - npm run test:interop:electron-main -- $RUN_SINCE -- -- --bail --timeout 10000
122
124
123
125
- stage : test
124
126
name : interop - electron-renderer
125
127
os : osx
126
128
script :
127
- - npm run test:interop:electron-renderer -- -- -- --bail --timeout 10000
129
+ - npm run test:interop:electron-renderer -- $RUN_SINCE -- -- --bail --timeout 10000
128
130
129
131
- stage : test
130
132
name : examples
131
133
script :
132
134
- npm run build -- --scope={ipfs,ipfs-http-client}
133
- - npm run test -- --scope=example* --concurrency=1
135
+ - npm run test -- $RUN_SINCE --scope=example* --concurrency=1
134
136
135
137
- stage : release-rc
136
138
# only run on changes to master
0 commit comments