karma-runner / karma-qunit

A Karma plugin. Adapter for QUnit testing framework.
MIT License
51 stars 38 forks source link

Dev patches #144

Closed XhmikosR closed 3 years ago

XhmikosR commented 3 years ago

We need to replace Travis with GitHub Actions, it's too slow...

Krinkle commented 3 years ago

Can probably change to unconditionally use Firefox (or FirefoxHeadless) here:

https://github.com/karma-runner/karma-qunit/blob/6c237ca7291621fd2701e6625d70f0d9ff3e4be7/karma.conf.js#L10

XhmikosR commented 3 years ago

I changed that but the issue is with the DISPLAY env variable. I've split the Action patch to another branch https://github.com/karma-runner/karma-qunit/compare/actions where you can see the failures.

Krinkle commented 3 years ago

I changed that but the issue is with the DISPLAY env variable.

Yeah, because it's using the regular graphical mode, which expects either a real monitor or an X11/Xvfb display.

Use the Headless variant to make this work without all that, both for local, Travis, or indeed GitHub.

I've split the Action patch to another branch https://github.com/karma-runner/karma-qunit/compare/actions where you can see the failures.

I see. I think the failures are because it's not really DISPLAY that it wants, it wants to use that to render to an actual X11 display from Xvfb, which it hasn't started in the GitHub version. But, I don't think that adds any value for us even if we add an xvfb-run to the GH job. We can use headless instead.

XhmikosR commented 3 years ago

OK, I will try using FirefoxHeadless and drop the DISPLAY env var and see how it goes. If it works, I'll merge the Actions patch to this branch.

XhmikosR commented 3 years ago

Firefox headless works now but Chrome fails. I tried process.env.CI ? ['ChromeHeadless'] : ['Chrome'] but still fails.

XhmikosR commented 3 years ago

I'm going to merge this and release a new patch version. Later we can update the rest of the deps and drop Node.js 8.x from CI.