-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
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. |
Fair enough. Can you explain a bit the changes here? What are they supposed to solve? |
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.
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" |
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 |
5e99a17
to
a03b0cf
Compare
I simply increase the load time to workaround 😁, open issue #398 to be addressed soon.
|
5250247
to
dc8dfc7
Compare
dc8dfc7
to
181e9a5
Compare
for more information, see https://pre-commit.ci
@@ -31,10 +31,11 @@ jobs: | |||
tag: [latest] | |||
browser: [Chrome, Firefox] | |||
python-version: ['3.8', '3.10'] | |||
firefox: ['96.0'] |
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 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
3aec5f4
to
d155aef
Compare
for more information, see https://pre-commit.ci
Fair, thanks a lot! I add the check for the matrix and add a comment. |
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.
All tests passing! 🎉 Thanks so much @unkcpz
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
No description provided.