Env variables

my karma tests dont run because It says i need to run CHROME_BIN=/usr/bin/google-chrome karma start --single-run,
should I run it as a build step?

Hello and welcome!

That usually goes on the same line as the test step, right before it. Can you share your config.yml file so we can better help?

version: 2
jobs:
  build:
    docker: 
      - image:  circleci/node:10
       environment:
          - CHROME_BIN=/usr/bin/google-chrome
    steps:
      - checkout
      - run: npm install
      - run: npm test

I set the environment steps per the sites instructions but I am getting Unable to parse YAML

while parsing a block collection

in ‘string’, line 5, column 7:

- image: circleci/node:10

^

expected , but found ‘’

in ‘string’, line 6, column 8:

environment:

Hey, were you able to take a look?

Hello, sorry for the delay in responding.

It needs to be changed to the following:

environment:
  CHROME_BIN: /usr/bin/google-chrome

https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-container

NVM I think I got it, thank you

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.