.yml file into your .github/workflows/plugwright.yml to get instant automated tests for every PR.
Private npm registries
If the test workspace installs from a private registry, declare it once inbuild.gradle.kts and pass the token through the environment. Nothing about the registry has to be configured on the runner, and the workflow file holds a secret name rather than a secret:
.npmrc from that block before each npm install. If NPM_TOKEN is missing from the job, the build stops and names it, instead of failing later with a 404 that looks like a typo in a package name. See Configuration.
The generated file is gitignored, but it does exist on disk for the length of the job. On a self-hosted runner with a shared workspace, clean it up the way you would any other credential the job writes.