Closed bugITwhisperer closed 6 months ago
Proposed solution (to be tested, but I don't have permission to edit the Settings of the project (and I haven't yet configured my own repository to use and test GitHub actions)):
Settings
> Security
> Secrets and variables
> Actions
> New repository secret
BASE_URL
USER_EMAIL
USER_PASSWORD
pw-tests.yml
delete the sections: Create .env file
(lines 23-27) and Delete .env
(lines 38-40)pw-tests.yml
add the following at the end of Run API checks
section (after the line run: npx playwright test
)
env:
BASE_URL: ${{ secrets.BASE_URL }}
USER_EMAIL: ${{ secrets.USER_EMAIL }}
USER_PASSWORD: ${{ secrets.USER_PASSWORD }}
Sources: Using Secrets in GitHub Actions
@Slawomir-DKl it will become clear during Your testing but seems to me that .env file must stay (as we use process.env function in few places in the code)
I'll check it on Monday (I'll be out of home till Sunday)
✏️ Description
Currently, the sensitive information such as app's URL and test user's credentials are directly visible in the workflow file instead of being protected. As discussed in our last meeting, it'd be best to use secrets to protect those.
🔧 Why We Need This
Using secrets in CI/CD pipeline is a good practice, because it:
🚀 Proposed Solution
TBA
✅ Issue reporting checklist
help-wanted
label