Skip to content
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

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

uuf6429
Copy link
Member

@uuf6429 uuf6429 commented Jan 8, 2025

No description provided.

@uuf6429
Copy link
Member Author

uuf6429 commented Jan 9, 2025

In conclusion:

  • BrowserKit (http client)
    • fails the checkbox test (throws InvalidArgumentException instead of DriverException)
  • BrowserKit (http kernel)
    • same as BrowserKit (http client)
  • Chrome
    • tonne of failures without a seemingly good reason
    • (it's worth noting that their custom tests use data uris instead of a webserver)
  • Selenium2
    • right-click test failed, no idea why
  • Classic
    • all good on firefox, crashes on chrome because of window test

@aik099
Copy link
Member

aik099 commented Jan 9, 2025

@uuf6429 you can ignore Zombie driver because of minkphp/MinkZombieDriver#206 . This driver should be archived.

@aik099
Copy link
Member

aik099 commented Jan 9, 2025

Interesting workflow. You've combined a minimal version of the workflow for each of the drivers.

Similar stuff was done in https://github.com/instaclick/php-webdriver/blob/master/.github/workflows/ci.yml as well, but for MinkSelenium2Driver only. Maybe that will help you.

Comment on lines 30 to 44
- name: Chrome
repo: https://gitlab.com/behat-chrome/chrome-mink-driver.git
php: 7.4
setup: |
mkdir ./logs
./vendor/bin/mink-test-server &> ./logs/mink-test-server.log &
docker run --net host --name chrome --volume /dev/shm:/dev/shm --shm-size 2g --volume ./vendor/mink/driver-testsuite/web-fixtures:/fixtures zenika/alpine-chrome:latest \
"--remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --disable-gpu --headless=new --disable-extensions --no-sandbox --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage" &> ./logs/chrome.log &
sed "s#http://localhost/#http://localhost:8002/#" phpunit.xml.dist > phpunit.xml
while ! nc -z localhost 9222 </dev/null; do echo Waiting for chrome to start...; sleep 1; done
while ! nc -z localhost 8002 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
test: |
export WEB_FIXTURES_BROWSER=chrome
export DRIVER_MACHINE_BASE_PATH=/fixtures/
./vendor/bin/phpunit --colors=always --testdox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we even test the 3rd party drivers?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's listed in our documentation.. (just as zombie and sahi), so I added it. This is in line with the "testing active drivers" comment from earlier.

.github/workflows/smoke.yml Outdated Show resolved Hide resolved
.github/workflows/smoke.yml Outdated Show resolved Hide resolved
.github/workflows/smoke.yml Outdated Show resolved Hide resolved
.github/workflows/smoke.yml Outdated Show resolved Hide resolved
@aik099
Copy link
Member

aik099 commented Jan 9, 2025

Selenium2
right-click test failed, no idea why

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.

@aik099
Copy link
Member

aik099 commented Jan 9, 2025

Failures for the MinkBrowserKitDriver are fixed in minkphp/MinkBrowserKitDriver#183 .

@aik099 aik099 mentioned this pull request Jan 9, 2025
@stof
Copy link
Member

stof commented Jan 9, 2025

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.

@uuf6429
Copy link
Member Author

uuf6429 commented Jan 9, 2025

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:

  1. we probably care that our changes do not impact them
  2. there are numerous ways to configure the workflow in a way it does not reflect bad on us, eg:
    • make the workflow as manually-triggered only so we only run it on demand (this was my original intention, but github doesn't let me run workflows manually before they have been merged to master, so I had to add the "pull_request" trigger)
    • marking jobs as allowed-to-fail
  3. we may request the vendor to maintain that part (with normal PRs) and if we see it doesn't happen, we can eventually just remove it
  4. adding to point 3, we can explicitly ask vendors to participate, and if they don't, they won't be guaranteed backward compatibility (which makes maintenance easier for us)
  5. the main objective of this workflow is to avoid making a local setup that is time consuming, non-reproducible and probably replicates other maintainers' efforts on their own machines.

Let me know if any of that convinces you and if still not convinced, I'll gladly remove this.

@aik099
Copy link
Member

aik099 commented Jan 10, 2025

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.

@uuf6429
Copy link
Member Author

uuf6429 commented Jan 10, 2025

Previously, GitHub Actions wasn't allowing ignoring build failures, which affected the CI badge in general on the README.md file.

@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).

@aik099
Copy link
Member

aik099 commented Jan 11, 2025

Previously, GitHub Actions wasn't allowing ignoring build failures, which affected the CI badge in general on the README.md file.

@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:

  1. one job for drivers located in the minkphp organization, that will run automatically
  2. another job for 3rd-party drivers (one per driver or maybe a combo job), that driver maintainers are welcome to adjust (we need to inform driver maintainers about such feature)

@aik099
Copy link
Member

aik099 commented Jan 11, 2025

It's strange that MinkSelenium2Driver job fails with Drag drop onto hidden itself test, when it doesn't fail on MinkSelenium2Driver repo test.

@uuf6429
Copy link
Member Author

uuf6429 commented Jan 11, 2025

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.

@aik099
Copy link
Member

aik099 commented Jan 11, 2025

... 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 webdriver-classic-driver repository. Now you should be able to retry builds, assign reviewers, merge, etc.

Enjoy.

@uuf6429
Copy link
Member Author

uuf6429 commented Jan 11, 2025

@uuf6429 , I've granted you the same permissions for this repository as on the webdriver-classic-driver repository. Now you should be able to retry builds, assign reviewers, merge, etc.

Awesome, I can stop that job that has been running for 5 hours 😅
https://github.com/minkphp/driver-testsuite/actions/runs/12722948823/job/35467568743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants