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

WIP: Notebook tests with Python 3.11 image #640

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
browser: [Chrome, Firefox]
# test on the latest and the oldest supported version
aiida-core-version: [2.1.2, 2.6.2]
aiida-core-version: [2.6.2]
fail-fast: false

runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
- name: Run pytest
run: pytest -v --driver ${{ matrix.browser }} tests_notebooks
env:
TAG: aiida-${{ matrix.aiida-core-version }}
TAG: pr-455

- name: Upload screenshots as artifacts
if: always()
Expand Down
4 changes: 3 additions & 1 deletion tests_notebooks/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import time
from pathlib import Path
from urllib.parse import urljoin

Expand Down Expand Up @@ -109,13 +110,14 @@ def _selenium_driver(nb_path):

selenium.find_element(By.ID, "ipython-main-app")
selenium.find_element(By.ID, "notebook-container")
selenium.find_element(By.ID, "appmode-busy")
# We wait until the appmode spinner disappears. However,
# this does not seem to be fully robust, as the spinner might flash
# while the page is still loading. So we add explicit sleep here as well.
time.sleep(2)
WebDriverWait(selenium, 240).until(
ec.invisibility_of_element((By.ID, "appmode-busy"))
)
time.sleep(10)

return selenium

Expand Down
7 changes: 1 addition & 6 deletions tests_notebooks/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ version: '3.4'
services:

aiidalab:
# TODO: When we drop support of images with aiida-core<2.4.0, we should go back to using
# the ghcr.io registry to pull the image,
# since the dockerhub registry has a rate limit of 100 pulls per 6 hours.
# Images with aiida-core<2.4.0 were not pushed to ghcr.io because of CI issues,
# which were fixed in https://github.com/aiidalab/aiidalab-docker-stack/pull/390
image: aiidalab/full-stack:${TAG:-latest}
image: ghcr.io/aiidalab/full-stack:${TAG:-latest}
environment:
RMQHOST: messaging
TZ: Europe/Zurich
Expand Down
Loading