-
Notifications
You must be signed in to change notification settings - Fork 33
It's not working in Gitlab CI Server #47
Comments
hey @wongjiahau! running electron (or electron tests) require a display (or virtual display), and it seems like your CI server does not support it, hence you get the message
you can try using another docker image (see circleci configuration for this repo) or you can play with things like |
Ran into a similar issue on Travis CI -- it would also hang, but it didn't print any errors while it waited, which was quite confusing. For any future readers, I fixed it by following the links at d4rkr00t/jest-electron-runner#5 (comment). My Travis CI config looks a bit like this: language: node_js
node_js: '10.16.0'
# cache folder with Electron binary (https://github.com/electron/electron/blob/master/docs/tutorial/installation.md#cache)
cache:
directories:
- ~/.cache
# run with xvfb bc it's needed for Electron (https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-the-xvfb-run-wrapper)
script: xvfb-run npm test The caching part isn't mentioned in the Travis headless docs or the Electron headless CI docs, but it is mentioned in Electron's installation docs. Hopefully this helps some folks! It might be worthwhile to officially document this for anyone who isn't knowledgeable about Electron + CI configuration. Can send a PR if this is agreed to be something that warrants officially documentation! |
Configurations
Docker image
nikolaik/python-nodejs:latest
What happened?
The log below is shown after running the
jest
command, and then it remained hanging and nothing happened after that, no output at all.The text was updated successfully, but these errors were encountered: