Skip to content

Commit

Permalink
ci: parallelize build process to speed up (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
trotyl authored and vthinkxie committed Dec 2, 2017
1 parent 68163a4 commit 9073bc8
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
20 changes: 14 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ branches:
only:
- master

env:
- TASK=build
- TASK=test
- TASK=integration-cli
- TASK=integration-webpack
- TASK=integration-rollup

addons:
apt:
sources:
Expand All @@ -21,11 +28,12 @@ before_install:
- sh -e /etc/init.d/xvfb start

before_script:
- npm install -g @angular/cli
- npm install -g karma
- ng build
- npm install -g @angular/cli
- npm install -g karma

script:
- npm run test
- npm run integration
- cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
- npm run $TASK
- |
if [ "$TASK" = "test" ]; then
cat ./coverage/lcov.info | ./node_modules/.bin/coveralls
fi
2 changes: 1 addition & 1 deletion integration/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test": "echo \"Error: no test... minimal project\" && exit 1",
"lint": "echo \"Error: no lint... minimal project\" && exit 1",
"e2e": "echo \"Error: no e2e... minimal project\" && exit 1",
"preintegration": "npm run setup && npm install",
"preintegration": "npm run setup && npm install --ignore-scripts",
"integration": "ng build --prod --build-optimizer"
},
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions integration/rollup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"e2e": "echo \"Error: no e2e... minimal project\" && exit 1",
"prengc": "npm run clean",
"ngc": "ngc -p src/tsconfig.app.json",
"preintegration": "npm run setup && npm install",
"preintegration": "npm run setup && npm install --ignore-scripts",
"integration": "npm run build"
},
"private": true,
Expand All @@ -42,7 +42,7 @@
"http-server": "^0.10.0",
"rimraf": "^2.6.1",
"rollup": "^0.49.2",
"rollup-plugin-angular-optimizer": "^0.1.0",
"rollup-plugin-angular-optimizer": "^0.2.0",
"rollup-plugin-commonjs": "^8.2.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion integration/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "echo \"Error: no test... minimal project\" && exit 1",
"lint": "echo \"Error: no lint... minimal project\" && exit 1",
"e2e": "echo \"Error: no e2e... minimal project\" && exit 1",
"preintegration": "npm run setup && npm install",
"preintegration": "npm run setup && npm install --ignore-scripts",
"integration": "npm run build"
},
"private": true,
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"release": "npm run generate && ng build --prod && npm run helper",
"test": "node --max_old_space_size=5120 ./node_modules/@angular/cli/bin/ng test --single-run --code-coverage",
"integration": "npm run generate && bash ./integration-test.sh",
"integration-cli": "npm run generate && cd integration/angular-cli && npm run integration",
"integration-webpack": "npm run generate && cd integration/webpack && npm run integration",
"integration-rollup": "npm run generate && cd integration/rollup && npm run integration",
"lint": "ng lint",
"e2e": "ng e2e"
},
Expand Down

0 comments on commit 9073bc8

Please sign in to comment.