Remove `sudo` requirement in order to make the action work with act
See original GitHub issueHi, I’m trying to run my Playwright GitHub Actions locally in order to generate image snapshots without the issues produced by cross-platform inconsistencies.
To run my actions locally I’m using act, but I’m having a problem because of the lack of sudo
support in the ubuntu-latest
act image. (the only working one is the complete nektos/act-environments-ubuntu:18.04
image, but it’s 18gb)
This is my action config:
jobs:
functional-chromium:
name: Chromium Functional Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
env:
RUNNER_TEMP: '/tmp/' # this is needed just to make `act` work
- uses: microsoft/playwright-github-action@v1
- uses: bahmutov/npm-install@v1
- run: npm run test:functional
env:
BROWSER: chromium
CI: true
Would it be possible to remove sudo
from the required executables? Or do you have other alternatives to run this action locally?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Is there a way to stop having to write 'sudo' for every little thing ...
Two options come to my mind: Own the directory you want by using chown : sudo chown your_username directory.
Read more >Unix/Linux Privilege Management: Should You Sudo?
Whenever a user tries to install, remove, or change any piece of software, they must have the root privileges to perform such tasks....
Read more >Yesterday I Learned: You can remove sudo : r/linux - Reddit
I quickly set a password and re-ran the command, and sudo actually uninstalled! You can still become root, you just have to use...
Read more >Execute sudo without Password? - Ask Ubuntu
Save and close the sudoers file (if you haven't changed your default terminal editor (you'll know if you have), press Ctl + x...
Read more >root login or sudo user for server administration?
Most security guides recommend disabling root SSH, primarily because it forces you to allow-list a user permission to do something. There's a ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Was this ever worked on? I’m running into the same issue
[E2E Tests/e2e] ☁ git clone 'https://github.com/microsoft/playwright-github-action' # ref=v1 [E2E Tests/e2e] 🐳 docker cp src=/Users/danjohnston/.cache/act/microsoft-playwright-github-action@v1 dst=/actions/ [E2E Tests/e2e] ❗ ::error::Unable to locate executable file: sudo. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
This should be fixed with the Playwright CLI, which has a feature integrated of installing the specific browser dependencies: https://playwright.dev/docs/cli#install-system-dependencies