Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
0e3c61faa1aaef62d33b9100b99314621e1b42f0218d7171fb86bf06631533ddbc6ca1e52f02033ae963File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| general: | ||
| artifacts: | ||
| - "build/test_images/" | ||
| - "build/test_images_diff/" | ||
| - build/test_images/ | ||
| - build/test_images_diff/ | ||
| machine: | ||
| node: | ||
| @@ -12,21 +12,16 @@ machine: | ||
| - docker | ||
| dependencies: | ||
| pre: | ||
| - eval $(node tasks/docker.js pull) | ||
| post: | ||
| - eval $(node tasks/docker.js run) | ||
| - npm run cibuild | ||
| override: | ||
| - npm install && npm dedupe && npm prune && npm install | ||
| - npm ls || true | ||
| - npm run docker -- pull | ||
| - npm run pretest | ||
| - eval $(node tasks/docker.js setup) | ||
| - npm prune && npm ls | ||
| - npm run docker -- run | ||
| - npm run cibuild | ||
| - npm run docker -- setup | ||
| ||
| test: | ||
| override: | ||
| - npm run test-image | ||
| - npm run test-image-gl2d | ||
| - npm run test-export | ||
| - npm run citest-jasmine | ||
| - npm run test-bundle | ||
| - npm run test-syntax | ||
| - eslint . | ||
| - ./tasks/ci_test.sh: | ||
| parallel: true | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -28,12 +28,12 @@ | ||
| "build": "npm run preprocess && npm run bundle && npm run header && npm run stats", | ||
| "cibuild": "npm run preprocess && node tasks/cibundle.js", | ||
| "watch": "node tasks/watch.js", | ||
| "lint": "eslint --version && eslint . || true", | ||
| "lint-fix": "eslint . --fix", | ||
| "lint": "eslint --version && eslint .", | ||
| "lint-fix": "eslint . --fix || true", | ||
| "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=1 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", | ||
| @@ -119,6 +119,9 @@ | ||
| "karma-coverage": "^1.0.0", | ||
| "karma-firefox-launcher": "^1.0.0", | ||
| "karma-jasmine": "^1.1.0", | ||
| "karma-jasmine-spec-tags": "^1.0.1", | ||
| "karma-spec-reporter": "0.0.30", | ||
| "karma-verbose-reporter": "0.0.6", | ||
| "madge": "^1.6.0", | ||
| "node-sass": "^4.5.0", | ||
| "npm-link-check": "^1.2.0", | ||
| @@ -128,7 +131,7 @@ | ||
| "read-last-lines": "^1.1.0", | ||
| "requirejs": "^2.3.1", | ||
| "through2": "^2.0.3", | ||
| "uglify-js": "^2.7.5", | ||
| "uglify-js": "~2.7.5", | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see #1450 (comment) ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably open an issue in | ||
| "watchify": "^3.9.0", | ||
| "xml2js": "^0.4.16" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| #!/bin/bash | ||
| EXIT_STATE=0 | ||
| case $CIRCLE_NODE_INDEX in | ||
| 0) | ||
| npm run test-image || EXIT_STATE=$? | ||
| npm run test-image-gl2d || EXIT_STATE=$? | ||
| npm run test-export || EXIT_STATE=$? | ||
| npm run test-syntax || EXIT_STATE=$? | ||
| npm run lint || EXIT_STATE=$? | ||
| exit $EXIT_STATE | ||
| ||
| ;; | ||
| 1) | ||
| npm run test-jasmine || EXIT_STATE=$? | ||
| npm run test-bundle || EXIT_STATE=$? | ||
| exit $EXIT_STATE | ||
| ;; | ||
| esac | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #! /bin/bash | ||
| EXIT_STATE=0 | ||
| # tests that aren't run on CI | ||
| # jasmine specs with @noCI tag | ||
| npm run citest-jasmine -- tests/*_test.js --tags noCI || EXIT_STATE=$? | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm very pleased with
| ||
| # mapbox image tests take too much resources on CI | ||
| npm run test-image -- mapbox_* || EXIT_STATE=$? | ||
| # run gl2d image test again (some mocks are skipped on CI) | ||
| npm run test-image-gl2d || EXIT_STATE=$? | ||
| exit $EXIT_STATE | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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); | ||
| @@ -53,13 +54,14 @@ func.defaultConfig = { | ||
| // frameworks to use | ||
| // available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
| frameworks: ['jasmine', 'browserify'], | ||
| frameworks: ['jasmine', 'jasmine-spec-tags', 'browserify'], | ||
| // list of files / patterns to load in the browser | ||
| // | ||
| // N.B. this field is filled below | ||
| files: [], | ||
| // list of files / pattern to exclude | ||
| exclude: [], | ||
| // preprocess matching files before serving them to the browser | ||
| @@ -75,7 +77,7 @@ func.defaultConfig = { | ||
| // See note in CONTRIBUTING.md about more verbose reporting via karma-verbose-reporter: | ||
| // https://www.npmjs.com/package/karma-verbose-reporter ('verbose') | ||
| // | ||
| reporters: ['progress'], | ||
| reporters: isSingleSuiteRun ? ['progress'] : ['dots', 'spec'], | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See https://github.com/mlex/karma-spec-reporter for more info. | ||
| // web server port | ||
| port: 9876, | ||
| @@ -84,14 +86,23 @@ 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 | ||
| browsers: ['Chrome_WindowSized'], | ||
| // custom browser options | ||
| // | ||
| // window-size values came from observing default size | ||
| // | ||
| // '--ignore-gpu-blacklist' allow to test WebGL on CI (!!!) | ||
| customLaunchers: { | ||
| Chrome_WindowSized: { | ||
| base: 'Chrome', | ||
| @@ -103,58 +114,64 @@ 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 | ||
| }, | ||
| // unfortunately a few tests don't behave well on CI | ||
| // using `karma-jasmine-spec-tags` | ||
| // add @noCI to the spec description to skip a spec on CI | ||
| client: { | ||
| tagPrefix: '@', | ||
| skipTags: isCI ? 'noCI' : null | ||
| }, | ||
| // use 'karma-spec-reporter' to log info about skipped specs | ||
| specReporter: { | ||
| suppressErrorSummary: true, | ||
| suppressFailed: true, | ||
| suppressPassed: true, | ||
| suppressSkipped: false, | ||
| showSpecTiming: false, | ||
| failFast: false | ||
| } | ||
| }; | ||
| // Add lib/index.js to single-suite runs, | ||
| // to avoid import conflicts due to plotly.js | ||
| // circular dependencies. | ||
| if(isSingleSuiteRun) { | ||
| func.defaultConfig.files = [ | ||
| func.defaultConfig.files.push( | ||
| pathToJQuery, | ||
| pathToMain, | ||
| testFileGlob | ||
| ]; | ||
| pathToMain | ||
| ); | ||
| func.defaultConfig.preprocessors[pathToMain] = ['browserify']; | ||
| func.defaultConfig.preprocessors[testFileGlob] = ['browserify']; | ||
| } | ||
| else if(isRequireJSTest) { | ||
| func.defaultConfig.files = [ | ||
| constants.pathToRequireJS, | ||
| constants.pathToRequireJSFixture, | ||
| testFileGlob | ||
| constants.pathToRequireJSFixture | ||
| ]; | ||
| } | ||
| else if(isIE9Test) { | ||
| // load ie9_mock.js before plotly.js+test bundle | ||
| // to catch reference errors that could occur | ||
| // when plotly.js is first loaded. | ||
| func.defaultConfig.files = [ | ||
| './assets/ie9_mock.js', | ||
| testFileGlob | ||
| ]; | ||
| func.defaultConfig.files.push('./assets/ie9_mock.js'); | ||
| func.defaultConfig.preprocessors[testFileGlob] = ['browserify']; | ||
| } | ||
| else { | ||
| func.defaultConfig.files = [ | ||
| pathToJQuery, | ||
| testFileGlob | ||
| ]; | ||
| func.defaultConfig.files.push(pathToJQuery); | ||
| func.defaultConfig.preprocessors[testFileGlob] = ['browserify']; | ||
| } | ||
| // lastly, load test file glob | ||
| func.defaultConfig.files.push(testFileGlob); | ||
| module.exports = func; | ||
Uh oh!
There was an error while loading. Please reload this page.

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This thing here is (a lot) more predictable than simply
npm installcc @bpostlethwaite@scjody