-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add smoke-test workflow #103
base: master
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
That's why it fails: minkphp/MinkSelenium2Driver#381 . I have no idea how to fix it using https://github.com/instaclick/php-webdriver . That is the only blocker before that driver's release. |
Failures for the MinkBrowserKitDriver are fixed in minkphp/MinkBrowserKitDriver#183 . |
I suggest removing the job for the third-party driver. I don't think it makes sense to make our CI job fail based on their behavior which is out of our control, especially given that they fail many tests currently. |
@stof @aik099 I'm not strongly in favour of keeping it, but hear out my arguments:
Let me know if any of that convinces you and if still not convinced, I'll gladly remove this. |
We can talk to 3rd party driver manufacturers to see if they're willing for their driver to be compatible by our test suite changes. Previously, GitHub Actions wasn't allowing ignoring build failures, which affected the CI badge in general on the README.md file. If you know how to allow a specific job within the build to fail without making the whole build fail but still showing that that job has failed (like in Travis CI times), then please do. So let's try. Trying doesn't cost us anything. |
@aik099 apparently it's still not possible without some workarounds: actions/runner#2347 😞 Then the remaining option is (as said) a manual job not triggered by CI (or workaround in the linked issue). |
@uuf6429 , then we'll do 2 jobs:
|
It's strange that MinkSelenium2Driver job fails with |
I think I've seen that failure in the past...could it be transient/random? Unfortunately I can't retry that job without pushing something to run the whole workflow. |
@uuf6429 , I've granted you the same permissions for this repository as on the Enjoy. |
Awesome, I can stop that job that has been running for 5 hours 😅 |
docker compose logs --no-color --no-log-prefix --timestamps selenium > ./logs/selenium.docker.log | ||
|
||
Unofficial: | ||
name: "✨️ ${{ matrix.name }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pushed a major update; it should work much better now and should be relatively easy to follow.
There's one major annoyance (on GitHub's side): they do not evaluate expressions in job.name
, (that line above), when the job is skipped.
But the impact is just that, so I think we can live with it.
- name: "Selenium2" | ||
driverRepoUrl: "https://github.com/minkphp/MinkSelenium2Driver.git" | ||
php: "7.2" | ||
# language=bash | ||
setUpCmd: | | ||
export SELENIUM_IMAGE=selenium/standalone-firefox:2.53.1 | ||
docker compose up --wait --quiet-pull | ||
curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status | ||
# language=bash | ||
testCmd: | | ||
export WEB_FIXTURES_BROWSER=firefox | ||
export DRIVER_MACHINE_BASE_PATH=/fixtures/ | ||
export WEB_FIXTURES_HOST=http://host.docker.internal:8002 | ||
./vendor/bin/phpunit --colors=always --testdox | ||
# language=bash | ||
tearDownCmd: | | ||
docker compose logs --no-color --no-log-prefix --timestamps selenium > ./logs/selenium.docker.log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update this part to reflect build script changes made in the minkphp/MinkSelenium2Driver#406?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean, it's already using docker compose
to extract logs (and the setUpCmd also uses it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I thought that you'd copy-pasted code fragments from the driver's build script. Apparently you didn't. Anyway, there is now a docker-compose.yml
file in the driver's repository that you could use.
I wonder how you're able to correctly start Selenium's Docker image with only docker compose up --wait --quiet-pull
command instead of docker run --net host --name selenium --volume /dev/shm:/dev/shm --volume ./vendor/mink/driver-testsuite/web-fixtures:/fixtures --shm-size 2g selenium/standalone-firefox:${{ matrix.selenium_version }} &> ./logs/selenium.log &
and still make fixtures discoverable from the Selenium ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I thought that you'd copy-pasted code fragments from the driver's build script. Apparently you didn't.
Actually, I did. That's why before it was using docker run
and then after your change I updated it to docker compose up
.
I wonder how you're able to correctly start Selenium's Docker image with only...
All the parts you mentioned after docker run
are in the docker-compose.yml
file. So docker compose up
is effectively doing the same thing as docker run
.
Note that docker-compose up
has been replaced with docker compose up
(in case that's unclear).
Also keep in mind that this workflow works differently - normally in most CI workflows you git clone
your repository, but it this workflow, I'm cloning the driver repository. So if the driver has its own docker-compose file or some special testing process, we can still call/use it in our workflow.
Purpose
The objective is to provide an extendable workflow for testing basic compatibility* multiple drivers in isolation.
* latest drivers and oldest supported dependencies
Third-party drivers can also add themselves, but will be treated a little bit differently, to avoid failures reflecting badly on our CI results (since GitHub doesn't allow us to ignore failures).
Current Driver Tests
✔️ BrowserKit (http client)
✔️ BrowserKit (http kernel)
🚧 Selenium2
🚧 Chrome
✔️ Classic
♻️ Sahi / Zombie / Goutte - deprecated/abandoned
❓ Panther
❓ Electron