forked from lodash-archive/lodash-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (65 loc) · 2.73 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: node_js
sudo: false
node_js:
- "5"
env:
global:
- BIN="node" EXPORTS="commonjs" NPM_VERSION="^2.0.0"
- OPTION="" QUERY="" TEST_BUILDS=false TRANSPILER="none"
- LOADER="requirejs" RUNNER_PATH="node_modules/lodash/test"
- SAUCE_PATH="$RUNNER_PATH/saucelabs.js" SAUCE_USERNAME="lodash"
- secure: "HUCzn6i9XZ53278fYMICHuHWaVtTZmJCfY4wv3BEu57CGshw9T399Vxul849vIusw3x9cf4iNrrry0RaZga7KfaJIVSESy4zeY4vnsJ+5QCiXGbobpNPYnhU50eTo95MqDh1/Uds+cv2HCo+4VH8yb+6k/p9xX0CC3TvvToX60M="
matrix:
-
- EXPORTS="es" TRANSPILER="babel"
- EXPORTS="node"
- EXPORTS="npm"
- TEST_BUILDS=true
matrix:
include:
- node_js: "0.8"
env: NPM_VERSION="~1.4.0"
- node_js: "0.8"
env: EXPORTS="npm" NPM_VERSION="~1.4.0"
- node_js: "0.10"
env:
- node_js: "0.10"
env: EXPORTS="npm"
- node_js: "0.12"
env:
- node_js: "0.12"
env: EXPORTS="npm"
- node_js: "4"
env:
- node_js: "4"
env: EXPORTS="npm"
- node_js: "5"
env: EXPORTS="amd"
- node_js: "5"
env: EXPORTS="amd" LOADER="curl"
- node_js: "5"
env: EXPORTS="amd" LOADER="dojo"
git:
depth: 10
branches:
only:
- master
before_install:
- "nvm use $TRAVIS_NODE_VERSION"
- "npm config set loglevel error"
- "npm i -g npm@\"$NPM_VERSION\""
- "git clone --depth=10 --branch=master git://github.com/lodash/lodash ./node_modules/lodash && cd $_ && npm i && cd ../../"
- "OUTPUT_PATH=\"./$EXPORTS\" && TARGET_PATH=\"../../../$EXPORTS/index.js\""
- "[ $EXPORTS != 'amd' ] || TARGET_PATH=\"../../../amd/main.js\""
- "[ $EXPORTS != 'amd' ] || (QUERY=\"build=$TARGET_PATH&loader=$LOADER&noglobals=true\" && TAGS=\"$LOADER,amd,development\")"
- "[ $EXPORTS != 'es' ] || TARGET_PATH=\"../../../$EXPORTS/lodash.js\""
- "[ $EXPORTS != 'npm' ] || OUTPUT_PATH=\"./npm/node_modules\""
- "[ $TEST_BUILDS == true ] || (npm i && node ./bin/lodash modularize exports=$EXPORTS -o $OUTPUT_PATH)"
- "[ $TRANSPILER != 'babel' ] || babel ./$EXPORTS --presets es2015 --out-dir ./$EXPORTS"
- "[ $EXPORTS != 'npm' ] || (cd ./npm && cp ../test/npm/index.js ./index.js && cd ../)"
script:
- "[ $EXPORTS != 'amd' ] || node $SAUCE_PATH name=\"lodash tests\" runner=\"$RUNNER_PATH/index.html?$QUERY\" tags=\"$TAGS\""
- "[ $EXPORTS != 'amd' ] || node $SAUCE_PATH name=\"backbone tests\" runner=\"$RUNNER_PATH/backbone.html?$QUERY\" tags=\"$TAGS,backbone\""
- "[ $EXPORTS != 'amd' ] || node $SAUCE_PATH name=\"underscore tests\" runner=\"$RUNNER_PATH/underscore.html?$QUERY\" tags=\"$TAGS,underscore\""
- "[ $EXPORTS == 'amd' ] || [ $TEST_BUILDS == true ] || $BIN $OPTION $RUNNER_PATH/test.js $TARGET_PATH"
- "[ $EXPORTS == 'amd' ] || [ $TEST_BUILDS == false ] || node ./test/test.js --time-limit 45m"