Skip to content

CircleCI: run jobs in parallel #3634

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 5 commits into from
Mar 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
test-image:
docker:
- image: plotly/testbed:latest
parallelism: 2
parallelism: 4
working_directory: /var/www/streambed/image_server/plotly.js/
steps:
- attach_workspace:
Expand Down
1 change: 0 additions & 1 deletion .circleci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ case $1 in

image2)
npm run test-export || EXIT_STATE=$?
npm run test-image-gl2d || EXIT_STATE=$?
exit $EXIT_STATE
;;

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"pretest": "node tasks/pretest.js",
"test-jasmine": "karma start test/jasmine/karma.conf.js",
"test-image": "node tasks/test_image.js",
"test-image-gl2d": "node tasks/test_image.js gl2d_* --queue",
"test-export": "node tasks/test_export.js",
"test-syntax": "node tasks/test_syntax.js && npm run find-strings -- --no-output",
"test-bundle": "node tasks/test_bundle.js",
Expand Down
40 changes: 1 addition & 39 deletions test/image/compare_pixels_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ argv._.forEach(function(pattern) {
throw new Error('No mocks found with pattern ' + pattern);
}

// gl2d have limited image-test support
if(pattern === 'gl2d_*') {
if(!isInQueue) {
console.log('WARN: Running gl2d image tests in batch may lead to unwanted results\n');
}
console.log('\nSorting gl2d mocks to avoid gl-shader conflicts');
sortGl2dMockList(mockList);
console.log('');
}

allMockList = allMockList.concat(mockList);
});

Expand Down Expand Up @@ -120,7 +110,7 @@ else {
function untestableFilter(mockName) {
var cond = !(
mockName === 'font-wishlist' ||
mockName.indexOf('gl2d_') !== -1 ||
// mockName.indexOf('gl2d_') !== -1 ||
mockName.indexOf('mapbox_') !== -1
);

Expand All @@ -129,34 +119,6 @@ function untestableFilter(mockName) {
return cond;
}

/* gl2d pointcloud and other non-regl gl2d mock(s)
* must be tested first on in order to work;
* sort them here.
*
* gl-shader appears to conflict with regl.
* We suspect that the lone gl context on CircleCI is
* having issues with dealing with the two different
* program binding algorithm.
*
* The problem will be solved by switching all our
* WebGL-based trace types to regl.
*
* More info here:
* https://github.com/plotly/plotly.js/pull/1037
*/
function sortGl2dMockList(mockList) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like we'll have to keep this:

Running

npm run test-image

off this branch fails at gl2d_pointcloud-basic:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could reproduce this issue locally! Nice catch 👀

With be33648, I reintroduced sortGl2dMockList and running npm run test-image completed without error 🎉

Copy link
Contributor

Choose a reason for hiding this comment

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

image

works for me too 🎉

var mockNames = ['gl2d_pointcloud-basic', 'gl2d_heatmapgl'];
var pos = 0;

mockNames.forEach(function(m) {
var ind = mockList.indexOf(m);
var tmp = mockList[pos];
mockList[pos] = m;
mockList[ind] = tmp;
pos++;
});
}

function runInBatch(mockList) {
var running = 0;

Expand Down