Skip to content

Commit

Permalink
chore: add extract_metadata task to CI (#859)
Browse files Browse the repository at this point in the history
  • Loading branch information
jelbourn authored and kara committed Jul 14, 2016
1 parent 25b4f21 commit 22254dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ env:
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
- MODE=lint
- MODE=circular_deps
- MODE=extract_metadata
- MODE=e2e
- MODE=saucelabs_required
- MODE=browserstack_required
Expand Down
16 changes: 14 additions & 2 deletions scripts/ci/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ source scripts/ci/sources/mode.sh
source scripts/ci/sources/tunnel.sh

start_tunnel
npm run build
npm run inline-resources

wait_for_tunnel
if is_lint; then
npm run tslint
npm run ci:forbidden-identifiers
npm run stylelint
elif is_circular_deps_check; then
# Build first because madge needs the JavaScript output.
ng build
npm run check-circular-deps
elif is_e2e; then
# Start up the e2e app. This will take some time.
Expand All @@ -32,12 +32,24 @@ elif is_e2e; then
echo "Waiting for e2e app to start"
while [ ! -f ./dist/components/button/button.js ]; do
sleep 2
echo -n ".."
done

echo "\nInlining resources"
npm run inline-resources

# Run the e2e tests on the served e2e app.
echo "Starting e2e tests"
ng e2e
elif is_extract_metadata; then
# Run `tsc` first so that the directory structure in dist/ matches what ngc expects.
./node_modules/.bin/tsc -p ./src/demo-app/
./node_modules/.bin/ngc -p ./src/demo-app/
else
# Unit tests
npm run build
npm run inline-resources

karma start test/karma.conf.js --single-run --no-auto-watch --reporters='dots'
fi
teardown_tunnel
4 changes: 4 additions & 0 deletions scripts/ci/sources/mode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ is_lint() {
is_circular_deps_check() {
[[ "$MODE" = circular_deps ]]
}

is_extract_metadata() {
[[ "$MODE" = extract_metadata ]]
}

0 comments on commit 22254dc

Please sign in to comment.