Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

docs: Potential fix for failing CI server. #7094

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions config/karma-ci.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var baseKarma = require('./karma.conf.js');

module.exports = function(config) {
baseKarma(config);

// Override defaults with custom CI settings
config.set({
// Only launch one browser at a time since doing multiple can cause disconnects/issues
concurrency: 1,

client: {
// Do not clear the context as this can cause reload failures with Jasmine
clearContext:false
}
});
};
3 changes: 0 additions & 3 deletions config/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ module.exports = function(config) {
singleRun: true,
autoWatch: false,

// Only launch one browser at a time since doing multiple can cause disconnects/issues
concurrency: 1,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
Expand Down
4 changes: 4 additions & 0 deletions gulp/tasks/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ exports.task = function (done) {
karmaConfig.reporters = args.reporters.trim().split(',');
}

if ( args.config ) {
karmaConfig.configFile = ROOT + '/' + args.config.trim();
}

gutil.log('Running unit tests on unminified source.');
karma = new Server( karmaConfig, captureError(testMinified,clearEnv));
karma.start();
Expand Down
15 changes: 8 additions & 7 deletions scripts/test-versions.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# the purpose of this file is to download
# The purpose of this file is to download
# assigned AngularJS source files and test
# them against this build of AngularMaterial.

# This works by pulling in all of the tags
# form angular.js, finding the highest version
# from angular.js, finding the highest version
# numbers for each branch (e.g. 1.3 => 1.3.X where
# X is the highest patch release). For each
# detected version it will then copy over each
# of the source files to the node_modules/angular-X
# folder and then run `gulp karma` to see if
# they pass. If there are one or more failed tests
# then this script will propagate a failed exit code
# then this script will propagate a failed exit code.

# [INPUT]
# just run `./scripts/test-versions.sh`
Expand All @@ -25,7 +25,7 @@ VERSIONS=(1.3 1.4 1.5 snapshot)
BROWSERS="Firefox,Chrome,Safari"

#
# DO NOT EDIT PASSED THIS LINE
# DO NOT EDIT PAST THIS LINE
#
CDN="https://code.angularjs.org"
FAILED=false
Expand Down Expand Up @@ -53,8 +53,8 @@ if [ ! -e ./tmp/angular.js ]; then
git clone https://github.com/angular/angular.js ./tmp/angular.js
fi

# this will gaurantee that we have the latest versions
# of AngularJS when testing material incase the HEAD
# this will guarantee that we have the latest versions
# of AngularJS when testing material in case the HEAD
# of ./tmp/angular.js is outdated.
git --git-dir ./tmp/angular.js/.git fetch

Expand Down Expand Up @@ -109,7 +109,8 @@ for VERSION in "${VERSIONS[@]}"; do
done

echo "\n"
node ./node_modules/gulp/bin/gulp.js karma --reporters='dots' --browsers=$BROWSERS
pwd
node ./node_modules/gulp/bin/gulp.js karma --config=config/karma-ci.conf.js --reporters='dots' --browsers=$BROWSERS
LAST_EXIT_CODE=$?

echo "\n\n--- Finished Testing AngularMaterial against AngularJS (${VERSION}) ---"
Expand Down