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

Install firefox/geckodriver in GH workflow for test #397

Merged
merged 10 commits into from
Nov 29, 2022
Merged

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Nov 28, 2022

No description provided.

@danielhollas
Copy link
Contributor

I am confused, the tests seem to be duplicated? e.g. running on both pull_reqest and push.

@unkcpz
Copy link
Member Author

unkcpz commented Nov 28, 2022

I am confused, the tests seem to be duplicated? e.g. running on both pull_reqest and push.

That's because I make the PR from this repo directly. Other repositories are the same has actions on pull request and push.

@danielhollas
Copy link
Contributor

Fair enough. Can you explain a bit the changes here? What are they supposed to solve?
Some tests seems to be still failing.

@unkcpz
Copy link
Member Author

unkcpz commented Nov 28, 2022

The test failed since somehow the github server doesn't install firefox by default but only the chrome engine. I think the change happened last week both QeApp and AWB encounter the same issue. However I cannot find the change log from web.
Install the geckodriver and firefox, and then specify the path to the firefox engine in selenium test solve the issue

Some tests seems to be still failing.

The test through selenium is still not very robust, it depends on whether the page is successfully loaded, where I set sleep time to wait to load but not always reach the end. Probably there are a pattern we can use to sure the page is loaded. Such like.

try:
    element_present = EC.presence_of_element_located((By.ID, 'element_id'))
    WebDriverWait(driver, timeout).until(element_present)
except TimeoutException:
    print "Timed out waiting for page to load"

@danielhollas
Copy link
Contributor

danielhollas commented Nov 28, 2022

The test through selenium is still not very robust, it depends on whether the page is successfully loaded, where I set sleep time to wait to load but not always reach the end. Probably there are a pattern we can use to sure the page is loaded. Such like.

That's an interesting pattern, thanks! Are you planning to implement it as part of this PR? Would be good to have the tests passing again.

I think it would be good to also pin the setuptools to get rid of the readthedocs failure. I guess it will take us some time to migrate to flit+pyproject.toml so we should fix it in the meantime. https://github.com/aiidateam/aiida-core/pull/5782/files

@unkcpz
Copy link
Member Author

unkcpz commented Nov 28, 2022

That's an interesting pattern, thanks! Are you planning to implement it as part of this PR? Would be good to have the tests passing again.

I simply increase the load time to workaround 😁, open issue #398 to be addressed soon.

I think it would be good to also pin the setuptools to get rid of the readthedocs failure. I guess it will take us some time to migrate to flit+pyproject.toml so we should fix it in the meantime

Yes, I agree. The pyproject.toml is added and pinning the setuptools version to 65.5.0. It seems the issue is fixed from 65.6.3, will try.

EDIT: the problem is from requests_cache required by eln notebook not installed, don't know why the previous version is fine. But it should work now after add it. doc build conf.py import the package which is not necessary.

@unkcpz unkcpz force-pushed the fix/fail-ff-test branch 4 times, most recently from 5250247 to dc8dfc7 Compare November 28, 2022 22:40
@@ -31,10 +31,11 @@ jobs:
tag: [latest]
browser: [Chrome, Firefox]
python-version: ['3.8', '3.10']
firefox: ['96.0']
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would make more sense for this to be an environment variable.
Having it here is a bit misleading, since if you were to set this to two versions, the matrix would be broken, since these versions are only valid for browser==Firefox, not browser==Chrome

.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
@unkcpz
Copy link
Member Author

unkcpz commented Nov 28, 2022

Fair, thanks a lot! I add the check for the matrix and add a comment.

danielhollas
danielhollas previously approved these changes Nov 28, 2022
Copy link
Contributor

@danielhollas danielhollas left a comment

Choose a reason for hiding this comment

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

All tests passing! 🎉 Thanks so much @unkcpz

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
@unkcpz unkcpz merged commit b776d66 into master Nov 29, 2022
@unkcpz unkcpz deleted the fix/fail-ff-test branch November 29, 2022 09:17
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.

2 participants