File tree Expand file tree Collapse file tree 4 files changed +40
-27
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +40
-27
lines changed
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ dependencies:
13
13
pre :
14
14
- docker pull plotly/testbed:latest
15
15
post :
16
+ - eval $(node tasks/run_docker.js)
16
17
- npm run cibuild
17
18
- npm run pretest
19
+ - eval $(node tasks/setup_docker.js)
18
20
19
21
test :
20
22
override :
Original file line number Diff line number Diff line change @@ -2,14 +2,11 @@ var fs = require('fs');
2
2
3
3
var constants = require ( './util/constants' ) ;
4
4
var common = require ( './util/common' ) ;
5
- var containerCommands = require ( './util/container_commands' ) ;
6
- var isCI = process . env . CIRCLECI ;
7
5
8
6
// main
9
7
makeCredentialsFile ( ) ;
10
8
makeSetPlotConfigFile ( ) ;
11
9
makeTestImageFolders ( ) ;
12
- if ( isCI ) runAndSetupImageTestContainer ( ) ;
13
10
14
11
// Create a credentials json file,
15
12
// to be required in jasmine test suites and test dashboard
@@ -55,30 +52,6 @@ function makeTestImageFolders() {
55
52
makeOne ( constants . pathToTestImagesDiff , 'test image diff folder' ) ;
56
53
}
57
54
58
- // On CircleCI, run and setup image test container once an for all
59
- function runAndSetupImageTestContainer ( ) {
60
-
61
- function run ( ) {
62
- var cmd = containerCommands . dockerRun ;
63
- common . execCmd ( cmd , function ( ) {
64
- logger ( 'run docker container' ) ;
65
-
66
- setTimeout ( setup , 500 ) ;
67
- } ) ;
68
- }
69
-
70
- function setup ( ) {
71
- var cmd = containerCommands . getRunCmd ( isCI , [
72
- containerCommands . setup
73
- ] ) ;
74
- common . execCmd ( cmd , function ( ) {
75
- logger ( 'setup docker container' ) ;
76
- } ) ;
77
- }
78
-
79
- run ( ) ;
80
- }
81
-
82
55
function logger ( task ) {
83
56
console . log ( 'ok ' + task ) ;
84
57
}
Original file line number Diff line number Diff line change
1
+ var constants = require ( './util/constants' ) ;
2
+ var common = require ( './util/common' ) ;
3
+ var containerCommands = require ( './util/container_commands' ) ;
4
+ var isCI = process . env . CIRCLECI ;
5
+
6
+ var msg = 'Booting up ' + constants . testContainerName + ' docker container' ;
7
+ var cmd = containerCommands . dockerRun ;
8
+
9
+ // Log command string on CircleCI,
10
+ // because node's `child_process.exec()` is having issues there
11
+
12
+ if ( isCI ) {
13
+ console . log ( cmd ) ;
14
+ }
15
+ else {
16
+ console . log ( msg ) ;
17
+ common . execCmd ( cmd ) ;
18
+ }
Original file line number Diff line number Diff line change
1
+ var constants = require ( './util/constants' ) ;
2
+ var common = require ( './util/common' ) ;
3
+ var containerCommands = require ( './util/container_commands' ) ;
4
+ var isCI = process . env . CIRCLECI ;
5
+
6
+ var msg = 'Setting up ' + constants . testContainerName + ' docker container for testing' ;
7
+ var cmd = containerCommands . getRunCmd ( process . env . CIRCLECI , [
8
+ containerCommands . setup
9
+ ] ) ;
10
+
11
+ // Log command string on CircleCI,
12
+ // because node's `child_process.exec()` is having issues there
13
+
14
+ if ( isCI ) {
15
+ console . log ( cmd ) ;
16
+ }
17
+ else {
18
+ console . log ( msg ) ;
19
+ common . execCmd ( cmd ) ;
20
+ }
You can’t perform that action at this time.
0 commit comments