Open FranciscoKloganB opened 1 year ago
# Add this because I got it to work on multiple OS runners :)
- name: 🏗️ Build test project
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
npm run build:linux
elif [ "$RUNNER_OS" == "macOS" ]; then
npm run build:mac
elif [ "$RUNNER_OS" == "Windows" ]; then
npm run build:win
else
echo "Operating system $RUNNER_OS is not supported"
exit 1
fi
shell: bash
# This action was the important part, it sets up and cleans up XVFB when running on Linux)
- name: 🎭 Run Playwright tests (using XVFB*)
uses: coactions/setup-xvfb@v1.0.1
with:
# Moved the test command here
run: npm run playwright:ci
A lot of the work on this repository has moved over to the electron-playwright-helpers repository. There's a GitHub workflow over there which shows how to configure a Playwright e2e test.
Sounds like you've got things working. But maybe this is helpful too.
[edit]: I managed to make it work; See reploy to original post.
Locally, on multiple computers of mine (different OS) everything works fine. However, when I run this on CI/CD via github actions, I get this pesky error which I was also getting when I was executing the against a regular chromium app (non-production build).
Getting a little desperate here. The build is available as expected on the
out
dir, just like locally.Hope you have some pointers for me! :robot:
For curiosity, here's a minimum version of my
checks-slow.yml
(which contains the e2e tests)