gitlabpolymer-starter-kitlit-element

gitlab error in testing a lit-element app


I'm using Gitlab as a CI/CD tool for my project and, I'm having this error trying to run the tests:

> pwa-starter-kit@0.9.0 test:unit /builds/jperera84/prop-mgm-app
> polymer test --module-resolution=node --npm


Error: No browsers configured to run

error:  cli runtime exception: Error: No browsers configured to run error:  Error: No browsers configured to run
    at Object.<anonymous> (/builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:518:19)
    at Generator.next (<anonymous>)
    at /builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:20:71
    at new Promise (<anonymous>)
    at __awaiter (/builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:16:12)
    at Object.validate (/builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/config.js:506:12)
    at Object.<anonymous> (/builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:64:22)
    at Generator.next (<anonymous>)
    at fulfilled (/builds/jperera84/prop-mgm-app/node_modules/polymer-cli/node_modules/web-component-tester/runner/steps.js:4:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pwa-starter-kit@0.9.0 test:unit: `polymer test
--module-resolution=node --npm` npm ERR! Exit status 1 npm ERR!  npm ERR! Failed at the pwa-starter-kit@0.9.0 test:unit script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!     /root/.npm/_logs/2019-10-12T00_10_45_442Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pwa-starter-kit@0.9.0 test: `npm run test:unit && npm run test:integration` npm ERR! Exit status 1 npm ERR!  npm ERR! Failed at the pwa-starter-kit@0.9.0 test script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR!     /root/.npm/_logs/2019-10-12T00_10_45_483Z-debug.log ERROR: Job failed: exit code 1

I checked in some docs about this, but I haven't found the way to configure my .gitlab-ci.yml to work properly:

This is my .gitlab-ci.yml file:

image: node:latest

variables:
  LAUNCHPAD_FIREFOX: /usr/local/bin/firefox
  LAUNCHPAD_CHROME: /usr/bin/chromium-browser

stages:
  - build
  - test

cache:
  paths:
    - node_modules/

install_dependencies:
  stage: build
  script:
    - npm install
  artifacts:
    paths:
      - node_modules/

testing_integration:
  stage: test
  script:
    - npm run test

This is a Lit-Element project basically running the Starter-kit.

Can anyone help me to find a possible solution?

Thanks


Solution

  • Looks like you need to build your own image. Start with node:latest (Debian based) and add Chromium/Firefox.