Skip to content

CircleCI with Ubuntu 14.04, 2x parallelism and WebGL jasmine tests #1455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 9, 2017
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"docker": "node tasks/docker.js",
"pretest": "node tasks/pretest.js",
"test-jasmine": "karma start test/jasmine/karma.conf.js",
"citest-jasmine": "karma start test/jasmine/karma.ciconf.js",
"citest-jasmine": "CIRCLECI=0 karma start test/jasmine/karma.conf.js",
Copy link
Contributor Author

@etpinard etpinard Mar 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO:

  • add cross-env to get this to work on Windows.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to fix whatever checks the CIRCLECI var. It's confusing to see CIRCLECI=0 on CircleCI. (If it needs to be this way, can you add a comment?)

Copy link
Contributor Author

@etpinard etpinard Mar 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right. Thanks for checking!

npm run citest-jasmine is now effectively obsolete. But the CI and local case can now be handled via npm run test-jasmine.

I kept "citest-jasmine" to not perturb workflows for other devs. But if I get enough 👍 I will gladly 🔪 it.

Moreover, this should really be:

"citest-jasmine": "CIRCLECI=1 karma start test/jasmine/karma.conf.js",

but funny story !!"0" in JS evaluates to true, not to be confused with !!0 which is false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speaking of which it's probably not work bringing in cross-env for some obsolete script. 🔪

"test-image": "node tasks/test_image.js",
"test-image-gl2d": "node tasks/test_image.js gl2d_* --queue",
"test-export": "node tasks/test_export.js",
Expand Down
42 changes: 0 additions & 42 deletions test/jasmine/karma.ciconf.js

This file was deleted.

16 changes: 9 additions & 7 deletions test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var constants = require('../../tasks/util/constants');

var arg = process.argv[4];

var isCI = !!process.env.CIRCLECI;
var testFileGlob = arg ? arg : 'tests/*_test.js';
var isSingleSuiteRun = (arg && arg.indexOf('bundle_tests/') === -1);
var isRequireJSTest = (arg && arg.indexOf('bundle_tests/requirejs') !== -1);
Expand Down Expand Up @@ -84,7 +85,13 @@ func.defaultConfig = {
colors: true,

// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
autoWatch: !isCI,

// if true, Karma captures browsers, runs the tests and exits
singleRun: isCI,

// how long will Karma wait for a message from a browser before disconnecting (30 ms)
browserNoActivityTimeout: 30000,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
Expand All @@ -103,19 +110,14 @@ func.defaultConfig = {
}
},

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

browserify: {
transform: ['../../tasks/util/shortcut_paths.js'],
extensions: ['.js'],
watch: true,
watch: !isCI,
debug: true
}
};


// Add lib/index.js to single-suite runs,
// to avoid import conflicts due to plotly.js
// circular dependencies.
Expand Down