I have spent a long time trying to debug this, but every solution I tried didn't work.
I have a project (here) containerised using docker, and the project itself uses Laravel, Nginx and Dusk.
If i try build the environment and run the dusk tests, they pass. Yet when i push this up to GH, the tests fail. I have dump()
ed inside the CI, and it seems to show an empty page (<html><head></head><body></body></html>
).
I feel like i've searched the whole internet at this point.
How i run my tests:
$ cd src/copytube
$ npm ci
$ npm run dev
$ composer install
$ docker-compose up -d
$ docker exec copytube_phpfpm php artisan dusk
Don't suppose anyone has any idea as to why/how tests would fail only in the CI? The only difference between local and the CI i can think of is, I use a Mac, whereas the CI uses an ubuntu runner. But even then, because everything is containerised, it shouldn't be a problem
EDIT
On every single test, it errors, saying Element oes not exist
, which makes sense becausee the page is just an empty body, the tests can be found here
EDIT 2
The CI failing can be seen here (old action)
I've disabled the dusk tests from running inside the workflow
EDIT 3
D:
I'll re-enable the tests so it can be easier to see
EDIT 4
Here's a PR where I enabled the dusk tests in the CI so you can see the errors: https://github.com/ebebbington/copytube/pull/161
question from:
https://stackoverflow.com/questions/65910820/laravel-dusk-tests-fail-in-github-ci-but-work-locally 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…