forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (34 loc) · 1011 Bytes
/
.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
language: node_js
node_js:
- "lts/*"
- "node"
env:
# we current only test "use strict" for our NPM builds
- TEST_BUILDING_USE_STRICT_BUNDLE=1
- BROWSER=1
- BROWSER=1 NOCOMPRESS=1
script:
- |
export BUILD_PARAMS=""
if [ "x$BROWSER" = "x1" ]; then
export BUILD_PARAMS="$BUILD_PARAMS -t browser"
else
export BUILD_PARAMS="$BUILD_PARAMS -t node"
fi
if [ "x$NOCOMPRESS" = "x1" ]; then
export BUILD_PARAMS="$BUILD_PARAMS -n"
fi
node tools/build.js $BUILD_PARAMS
# test that our build is "use strict" safe for use with packaging
# systems importing our source thru ES6 modules (rollup, etc.)
if [ "x$TEST_BUILDING_USE_STRICT_BUNDLE" = "x1" ]; then
./node_modules/.bin/rollup -c test/builds/rollup_import_via_commonjs.js
node build/bundle.js || exit 1
rm build/bundle.js
fi
if [ "x$BROWSER" = "x1" ]; then
npm run test-browser
else
npm run test
fi
sudo: false # Use container-based architecture