language: node_js
node_js:
- "lts/*"
- "node"
env:
- BUILD=node TEST_STRICT_BUNDLE=1
- BUILD=browser
- BUILD=browser NO_MINIFY=1
script:
- |
export BUILD_PARAMS="-t $BUILD"
if [ "x$NO_MINIFY" = "x1" ]; then
export BUILD_PARAMS="$BUILD_PARAMS -n"
fi
node tools/build.js $BUILD_PARAMS
if [ "x$TEST_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$BUILD" = "xnode" ]; then
npm run test
else
npm run test-browser || exit 1
node test/builds/browser_build_as_commonjs.js
fi
sudo: false