here’s my config.yml:
command: ‘npm run smoketestsuite’
# record: true # record results on Cypress Dashboard
# parallel: true # split all specs across machines
# parallelism: 3 # use 4 CircleCI machines to finish quickly
# group: ‘smoke tests’ # name this group “smoke tests” on the dashboard
my package.json has this script:
“smoketest”: “npx cypress open --env configFile=staging,grep=smoke”
Could you explain a little more about what you mean by your environment variables are not being loaded up?
By default, any project level environment variables should be loaded into your build.
Any context level variables will be loaded by specifying the context name with the context key as you have done.
Any easy way to check if variables are being loaded is to take a look at the output of the “Preparing environment variables” step of your job.
If you would like us to take a deeper look at your pipeline, please submit a ticket through our support portal at Submit a request – CircleCI Support Center and one of our Support Engineers will take a look.
The environment variable shows up during the “Preparing environment variables” part, right?
However, during the cypress execution the environment variable isn’t loaded properly and the test is failing. If you see my circleci config file has context property too.
Let me know if you want more details or if it’s better to create a ticket to anyone from Support team to take a look.
Thanks for quick response!
Hi @pedrohyvo ,
I think taking a look at your builds on CircleCI directly would give us more insight into what is going on. If you could send us a support request including your account name and a link to your pipeline, then one of our Support Engineers will assist you.