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