Skip to content

Commit 7b2f757

Browse files
committed
build(gulp/travis): move circular check and style check to before pre/post-test tasks
In order to speedup the startup time of test.unit.js task, we are moving the circular dependency check into a pre-test check that executes only on travis. Similarly we are moving the style check to a post-test check that executes on travis. This way if a circular dependency issue occurs, we find it before running tests on CI and if the code is not formatted we fail the build only if all the tests pass. Related to angular#2536 Related to angular#2094
1 parent a67f231 commit 7b2f757

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

gulpfile.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,20 @@ gulp.task('test.transpiler.unittest', function(done) {
559559
runJasmineTests(['tools/transpiler/unittest/**/*.js'], done);
560560
});
561561

562+
563+
// -----------------
564+
// Pre/Post-test checks
565+
566+
gulp.task('pre-test-checks', function(done) {
567+
runSequence('build/checkCircularDependencies', sequenceComplete(done));
568+
});
569+
570+
571+
gulp.task('post-test-checks', function(done) {
572+
runSequence('enforce-format', sequenceComplete(done));
573+
});
574+
575+
562576
// -----------------
563577
// orchestrated targets
564578

@@ -686,8 +700,6 @@ gulp.task('!broccoli.js.prod', function() {
686700
gulp.task('build.js.dev', ['build/clean.js'], function(done) {
687701
runSequence(
688702
'broccoli.js.dev',
689-
'build/checkCircularDependencies',
690-
'check-format',
691703
sequenceComplete(done)
692704
);
693705
});

scripts/ci/build_js.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ SCRIPT_DIR=$(dirname $0)
88
source $SCRIPT_DIR/env_dart.sh
99
cd $SCRIPT_DIR/../..
1010

11-
./node_modules/.bin/gulp enforce-format
1211
./node_modules/.bin/gulp build.js
1312
./node_modules/.bin/gulp docs

scripts/ci/test_js.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,7 @@ if ${SCRIPT_DIR}/env_dart.sh 2>&1 > /dev/null ; then
1212
source $SCRIPT_DIR/env_dart.sh
1313
fi
1414

15+
./node_modules/.bin/gulp pre-test-checks
1516
./node_modules/.bin/gulp test.js --browsers=${KARMA_BROWSERS:-ChromeCanary}
1617
${SCRIPT_DIR}/test_e2e_js.sh
18+
./node_modules/.bin/gulp post-test-checks

0 commit comments

Comments
 (0)