因果并行npm软件包不适用于圈子CI

时间:2019-05-16 08:10:06

标签: angular unit-testing karma-runner circleci

我正在使用karma-parallel npm软件包在有角度的应用程序上运行karma单元测试。在我的本地计算机上,它像一个魅力一样工作,并大大减少了构建时间。但是,当我在Circle CI上运行时,单元测试用例似乎失败了。

我仍在寻找Circle CI是否支持业力平行度,但是我还没有发现任何东西

My Karma.conf.js file looks like this:

    module.exports = function (config) {
       config.set({
          basePath: '',
          frameworks: ['parallel', 'jasmine', '@angular-devkit/build-angular'],
          plugins: [
             require('karma-parallel'),
             require('karma-jasmine'),
             require('karma-chrome-launcher'),
             require('karma-spec-reporter'),
             require('karma-jasmine-html-reporter'),
             require('karma-coverage-istanbul-reporter'),
             require('@angular-devkit/build-angular/plugins/karma')
          ],
          parallelOptions: {
             executors: 2,
             shardStrategy: 'round-robin' 

         })};

Expected Behavior: The unit tests should run in parallel on the circle CI as they do on my local machine.

Actual Behavior: The unit test fails on the circle CI and I get the following error:

Error: spawn ENOMEM
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at spawn (child_process.js:538:9)
    at Object.fork (child_process.js:113:10)
    at fork (/home/circleci/project/node_modules/worker-farm/lib/fork.js:17:36)
    at Farm.startChild (/home/circleci/project/node_modules/worker-farm/lib/farm.js:107:16)
    at Farm.processQueue (/home/circleci/project/node_modules/worker-farm/lib/farm.js:288:10)
    at Farm.<anonymous> (/home/circleci/project/node_modules/worker-farm/lib/farm.js:98:21)
    at ontimeout (timers.js:436:11)
    at tryOnTimeout (timers.js:300:5)
    at listOnTimeout (timers.js:263:5)
    at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! test-app@0.0.0 build: `node --max_old_space_size=8096 node_modules/@angular/cli/bin/ng build --prod --source-map=false --watch=false "-c=qa"`
npm ERR! Exit status 1

0 个答案:

没有答案