I want to execute my test script on multiple environment using the same code and same workflow over Github actions.
I am not able to pass the environment variable to the npx command.
Code I am using :
workflow_dispatch:
inputs:
Environment:
type: choice
description: 'Account URL which you want to test'
required: true
default: 'STG'
name: Run playwright
env:
URL = ${{github.event.inputs.Environment}}
id: runPlaywright
run: |
xvfb-run -- npx playwright test tests/IAM_Sanity/SignUp-SignIn
In Playwright :
I am using baseURl in playwright.config.js. and accessing this element using process.env.URL.
in my local, I am able to use it by running $env.URL = STG
Please suggest some solution