0

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

Nicolas Pepinster
  • 5,413
  • 2
  • 30
  • 48
Jose Raul Perera
  • 778
  • 1
  • 7
  • 35
  • The error here is pretty straightforward: "Error: No browsers configured to run" -- probably browser should be installed in container to work in headless mode? – Janusz Oct 15 '19 at 11:48
  • Thanks @Janusz I totally agree with you, I understand the problem is that the browsers are not installed, my question is, if anyone has done this before and help me to find the right config to install the browsers. – Jose Raul Perera Oct 15 '19 at 12:09

1 Answers1

0

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

Janusz
  • 1,343
  • 11
  • 16