From 55c03a0966a3972ea48de552d8777c822c464a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rok=20Ro=C5=A1kar?= Date: Tue, 14 May 2024 16:53:45 +0200 Subject: [PATCH] chore: do not override RSTUDIO_VERSION in CI (#439) Co-authored-by: Flora Thiebaut --- .../workflows/build-and-push-to-docker.yml | 843 +++++++++--------- docker/r/Dockerfile | 4 +- tests/cypress/e2e/jupyterlab.cy.ts | 47 +- tests/cypress/e2e/rstudio.cy.ts | 47 +- tests/index.ts | 2 +- tests/package-lock.json | 370 ++++++-- tests/package.json | 4 +- 7 files changed, 816 insertions(+), 501 deletions(-) diff --git a/.github/workflows/build-and-push-to-docker.yml b/.github/workflows/build-and-push-to-docker.yml index 98b512bb..61dce3f8 100644 --- a/.github/workflows/build-and-push-to-docker.yml +++ b/.github/workflows/build-and-push-to-docker.yml @@ -33,21 +33,21 @@ jobs: fail-fast: true matrix: DOCKERFILE_PATH: - - docker/py/Dockerfile - - docker/r/Dockerfile - - docker/cuda/Dockerfile - - docker/vnc/Dockerfile - - docker/matlab/Dockerfile - - docker/julia/Dockerfile - - docker/batch/Dockerfile - - docker/qgis/Dockerfile + - docker/py/Dockerfile + - docker/r/Dockerfile + - docker/cuda/Dockerfile + - docker/vnc/Dockerfile + - docker/matlab/Dockerfile + - docker/julia/Dockerfile + - docker/batch/Dockerfile + - docker/qgis/Dockerfile runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: hadolint/hadolint-action@v3.1.0 - with: - dockerfile: ${{ matrix.DOCKERFILE_PATH }} - config: .hadolint.yaml + - uses: actions/checkout@v4 + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: ${{ matrix.DOCKERFILE_PATH }} + config: .hadolint.yaml build-py: needs: lint @@ -66,58 +66,57 @@ jobs: - BASE_PYTHON_VERSION: "3.8" REGISTRY: docker.io steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - - name: Build and load - uses: docker/build-push-action@v5 - with: - build-args: | - BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - cache-from: type=gha - cache-to: type=gha,mode=max - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - # export the base images for other jobs to use - - name: Build and export - uses: docker/build-push-action@v5 - with: - build-args: | + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + - name: Build and load + uses: docker/build-push-action@v5 + with: + build-args: | BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - cache-from: type=gha - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + # export the base images for other jobs to use + - name: Build and export + uses: docker/build-push-action@v5 + with: + build-args: | + BASE_IMAGE=${{ matrix.REGISTRY }}/jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + cache-from: type=gha + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + build-py-homedir-env: needs: lint runs-on: ubuntu-latest @@ -130,61 +129,61 @@ jobs: - "3.9" - "3.8" steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - - name: Build and load - uses: docker/build-push-action@v5 - with: - build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - CONDA_ENVS_DIRS=/home/jovyan/work/envs - cache-from: type=gha - cache-to: type=gha,mode=max - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - # export the default base image for other jobs to use - - name: Build and export - if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION - uses: docker/build-push-action@v5 - with: - build-args: | + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py-homedir-envs + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + - name: Build and load + uses: docker/build-push-action@v5 + with: + build-args: | + BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + CONDA_ENVS_DIRS=/home/jovyan/work/envs + cache-from: type=gha + cache-to: type=gha,mode=max + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-py-homedir-envs:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + # export the default base image for other jobs to use + - name: Build and export + if: matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION + uses: docker/build-push-action@v5 + with: + build-args: | BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} CONDA_ENVS_DIRS=/home/jovyan/work/envs - cache-from: type=gha - context: docker/py - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false + cache-from: type=gha + context: docker/py + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false build-py-multiarch: needs: build-py @@ -198,38 +197,38 @@ jobs: - "3.9" - "3.8" steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-py - tags: | - type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: docker/py - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-to: type=gha,mode=max - cache-from: type=gha - build-args: | - BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} - platforms: linux/amd64,linux/arm64 - provenance: false + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-py + tags: | + type=sha,prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.BASE_PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.BASE_PYTHON_VERSION == env.DEFAULT_PYTHON_VERSION }} + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: docker/py + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-to: type=gha,mode=max + cache-from: type=gha + build-args: | + BASE_IMAGE=jupyter/base-notebook:python-${{ matrix.BASE_PYTHON_VERSION }} + platforms: linux/amd64,linux/arm64 + provenance: false build-cuda: needs: build-py @@ -278,73 +277,73 @@ jobs: LIBCUDNN_PACKAGE: "libcudnn8=8.9.5.29-1+cuda12.2" ADD_2204_APT_REPOS: "true" steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set outputs - id: vars - run: | - sha_short=$(git rev-parse --short HEAD) - echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-cuda - tags: | - type=sha,prefix=${{ matrix.CUDA_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} - - name: Build and load - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - CUDA_VERSION=${{ matrix.CUDA_VERSION }} - EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} - context: docker/cuda - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: | - type=inline - type=registry,ref=${{ steps.vars.outputs.renku_base }} - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} - CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} - CUDA_VERSION=${{ matrix.CUDA_VERSION }} - EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} - LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} - context: docker/cuda - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - provenance: false - + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set outputs + id: vars + run: | + sha_short=$(git rev-parse --short HEAD) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-cuda + tags: | + type=sha,prefix=${{ matrix.CUDA_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.CUDA_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.CUDA_VERSION == '11.7' }} + - name: Build and load + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + CUDA_VERSION=${{ matrix.CUDA_VERSION }} + EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + ADD_2204_APT_REPOS=${{ matrix.ADD_2204_APT_REPOS }} + context: docker/cuda + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: | + type=inline + type=registry,ref=${{ steps.vars.outputs.renku_base }} + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-cuda:${{ steps.meta.outputs.version }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + CUDA_COMPAT_PACKAGE=${{ matrix.CUDA_COMPAT_PACKAGE }} + CUDA_CUDART_PACKAGE=${{ matrix.CUDA_CUDART_PACKAGE }} + CUDA_VERSION=${{ matrix.CUDA_VERSION }} + EXTRA_LIBRARIES=${{ matrix.EXTRA_LIBRARIES }} + LIBCUDNN_PACKAGE=${{ matrix.LIBCUDNN_PACKAGE }} + context: docker/cuda + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + provenance: false + build-py-ext: needs: build-py runs-on: ubuntu-latest @@ -360,42 +359,42 @@ jobs: - EXTENSION: batch PYTHON_VERSION: "3.10" steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set outputs - id: vars - run: | - sha_short=$(git rev-parse --short HEAD) - echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - tags: | - type=sha,prefix=${{ matrix.PYTHON_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.PYTHON_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix=${{ matrix.PYTHON_VERSION }}- - - name: Build and push - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ env.DOCKER_PREFIX }}-py:${{ matrix.PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} - context: docker/${{ matrix.EXTENSION }} - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - uses: actions/checkout@v4 + - name: Set outputs + id: vars + run: | + sha_short=$(git rev-parse --short HEAD) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + tags: | + type=sha,prefix=${{ matrix.PYTHON_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.PYTHON_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix=${{ matrix.PYTHON_VERSION }}- + - name: Build and push + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ env.DOCKER_PREFIX }}-py:${{ matrix.PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} + context: docker/${{ matrix.EXTENSION }} + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + build-vnc-ext: needs: build-py-ext runs-on: ubuntu-latest @@ -406,41 +405,41 @@ jobs: - matlab - qgis steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - uses: actions/checkout@v4 - - name: Set outputs - id: vars - run: | - sha_short=$(git rev-parse --short HEAD) - echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} - tags: | - type=sha,prefix= - type=semver,pattern={{version}},prefix= - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= - - name: Build and push - uses: docker/build-push-action@v5 - with: - build-args: | - BASE_IMAGE=${{ env.DOCKER_PREFIX }}-vnc:${{ env.DEFAULT_PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} - context: docker/${{ matrix.VNC-EXTENSION }} - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - uses: actions/checkout@v4 + - name: Set outputs + id: vars + run: | + sha_short=$(git rev-parse --short HEAD) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.VNC-EXTENSION }} + tags: | + type=sha,prefix= + type=semver,pattern={{version}},prefix= + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }},prefix= + - name: Build and push + uses: docker/build-push-action@v5 + with: + build-args: | + BASE_IMAGE=${{ env.DOCKER_PREFIX }}-vnc:${{ env.DEFAULT_PYTHON_VERSION }}-${{ steps.vars.outputs.sha_short }} + context: docker/${{ matrix.VNC-EXTENSION }} + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + build-julia-ext: needs: build-py runs-on: ubuntu-latest @@ -448,189 +447,199 @@ jobs: strategy: fail-fast: true matrix: - include: + include: - JULIA_VERSION: "1.7.1" JULIA_CHECKSUM: "44658e9c7b45e2b9b5b59239d190cca42de05c175ea86bc346c294a8fe8d9f11" - JULIA_VERSION: "1.8.5" JULIA_CHECKSUM: "e71a24816e8fe9d5f4807664cbbb42738f5aa9fe05397d35c81d4c5d649b9d05" - JULIA_VERSION: "1.9.0" JULIA_CHECKSUM: "00c614466ef9809c2eb23480e38d196a2c577fff2730c4f83d135b913d473359" - + steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + + - uses: actions/checkout@v4 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3.0.0 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set outputs + id: vars + run: | + sha_short=$(git rev-parse --short HEAD) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-julia + tags: | + type=sha,prefix=${{ matrix.JULIA_VERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} + - name: Build and load + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} + JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} + context: docker/julia + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} + TEST_USER_NAME: jovyan + TEST_SPEC: jupyterlab.cy.ts + with: + working-directory: tests + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + context: docker/julia + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false - - uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3.0.0 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Set outputs - id: vars - run: | - sha_short=$(git rev-parse --short HEAD) - echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-julia - tags: | - type=sha,prefix=${{ matrix.JULIA_VERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.JULIA_VERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.JULIA_VERSION == '1.9.0' }} - - name: Build and load - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - JULIA_VERSION_ARG=${{ matrix.JULIA_VERSION }} - JULIA_CHECKSUM=${{ matrix.JULIA_CHECKSUM }} - context: docker/julia - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - cache-to: type=gha - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${DOCKER_PREFIX}-julia:${{ matrix.JULIA_VERSION }}-${{ steps.vars.outputs.sha_short }} - TEST_USER_NAME: jovyan - TEST_SPEC: jupyterlab.cy.ts - with: - working-directory: tests - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - context: docker/julia - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - build-r-ubuntu: needs: build-py runs-on: ubuntu-latest - env: - RSTUDIO_VERSION: 2022.02.3-492 strategy: - fail-fast: true + fail-fast: false matrix: include: - RVERSION: 4.1.0 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: 4.1.1 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: 4.1.2 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: 4.2.0 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: 4.2.3 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: 4.3.1 BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.12.1+402 - RVERSION: devel BASE_IMAGE_NAME: rocker/verse EXTENSION: r + RSTUDIO_VERSION: 2023.12.1+402 - RVERSION: RELEASE_3_14 BASE_IMAGE_NAME: bioconductor/bioconductor_docker EXTENSION: bioc + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: RELEASE_3_15 BASE_IMAGE_NAME: bioconductor/bioconductor_docker EXTENSION: bioc + RSTUDIO_VERSION: 2023.03.2+454 - RVERSION: RELEASE_3_16 BASE_IMAGE_NAME: bioconductor/bioconductor_docker EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 - RVERSION: RELEASE_3_17 BASE_IMAGE_NAME: bioconductor/bioconductor_docker EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 - RVERSION: RELEASE_3_18 BASE_IMAGE_NAME: bioconductor/bioconductor_docker EXTENSION: bioc + RSTUDIO_VERSION: 2023.12.1+402 # NOTE: The devel version of bioconductor uses unstable R so it often breaks or fails to build # - RVERSION: devel # BASE_IMAGE_NAME: bioconductor/bioconductor_docker # EXTENSION: bioc steps: - - name: Docker Login - uses: Azure/docker-login@v1 - with: - username: ${{ secrets.RENKU_DOCKER_USERNAME }} - password: ${{ secrets.RENKU_DOCKER_PASSWORD }} + - name: Docker Login + uses: Azure/docker-login@v1 + with: + username: ${{ secrets.RENKU_DOCKER_USERNAME }} + password: ${{ secrets.RENKU_DOCKER_PASSWORD }} - - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Set outputs - id: vars - run: | - sha_short=$(git rev-parse --short HEAD) - echo "sha_short=$sha_short" >> $GITHUB_OUTPUT - echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT - - name: Docker meta - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} - tags: | - type=sha,prefix=${{ matrix.RVERSION }}- - type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} - - name: Clean cache - run: | - df -h - rm -rf /opt/hostedtoolcache/* - df -h - - name: Build and load - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - RSTUDIO_VERSION_OVERRIDE=${{ env.RSTUDIO_VERSION }} - context: docker/r - labels: ${{ steps.meta.outputs.labels }} - load: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false - - name: Image Acceptance Tests - uses: cypress-io/github-action@v6 - env: - TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} - TEST_ENV: rstudio - TEST_USER_NAME: rstudio - TEST_SPEC: rstudio.cy.ts - with: - working-directory: tests - start: docker images - command: npx mocha -r ts-node/register index.ts - - name: Build and push - uses: docker/build-push-action@v5 - with: - build-args: | - RENKU_BASE=${{ steps.vars.outputs.renku_base }} - BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} - RSTUDIO_VERSION_OVERRIDE=${{ env.RSTUDIO_VERSION }} - context: docker/r - labels: ${{ steps.meta.outputs.labels }} - push: true - tags: ${{ steps.meta.outputs.tags }} - cache-from: type=gha - provenance: false + - uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Set outputs + id: vars + run: | + sha_short=$(git rev-parse --short HEAD) + echo "sha_short=$sha_short" >> $GITHUB_OUTPUT + echo "renku_base=${DOCKER_PREFIX}-py:${DEFAULT_PYTHON_VERSION}-${sha_short}" >> $GITHUB_OUTPUT + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }} + tags: | + type=sha,prefix=${{ matrix.RVERSION }}- + type=semver,pattern={{version}},prefix=${{ matrix.RVERSION }}- + type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' && matrix.RVERSION == 'devel' }} + - name: Clean cache + run: | + df -h + rm -rf /opt/hostedtoolcache/* + df -h + - name: Build and load + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + context: docker/r + labels: ${{ steps.meta.outputs.labels }} + load: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false + - name: Image Acceptance Tests + uses: cypress-io/github-action@v6 + env: + TEST_IMAGE_NAME: ${{ env.DOCKER_PREFIX }}-${{ matrix.EXTENSION }}:${{ matrix.RVERSION }}-${{ steps.vars.outputs.sha_short }} + TEST_ENV: rstudio + TEST_USER_NAME: rstudio + TEST_SPEC: rstudio.cy.ts + with: + working-directory: tests + start: docker images + command: npx mocha -r ts-node/register index.ts + - name: Build and push + uses: docker/build-push-action@v5 + with: + build-args: | + RENKU_BASE=${{ steps.vars.outputs.renku_base }} + BASE_IMAGE=${{ matrix.BASE_IMAGE_NAME }}:${{ matrix.RVERSION }} + RSTUDIO_VERSION_OVERRIDE=${{ matrix.RSTUDIO_VERSION }} + context: docker/r + labels: ${{ steps.meta.outputs.labels }} + push: true + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + provenance: false diff --git a/docker/r/Dockerfile b/docker/r/Dockerfile index b2738426..e9fba7dc 100644 --- a/docker/r/Dockerfile +++ b/docker/r/Dockerfile @@ -32,7 +32,7 @@ RUN echo "PATH=${PATH}" >> /usr/local/lib/R/etc/Renviron.site && \ ENV LD_LIBRARY_PATH /usr/local/lib/R/lib # pin the version of RStudio -ARG RSTUDIO_VERSION_OVERRIDE="2023.06.0-421" +ARG RSTUDIO_VERSION_OVERRIDE="2023.12.1-402" ENV RSTUDIO_VERSION=${RSTUDIO_VERSION_OVERRIDE} # if rstudio and rstudio-server users are not deleted below, the installation # script fails when it installs rstudio and tries to add them back in @@ -102,7 +102,7 @@ RUN echo ". ${CONDA_PATH}/etc/profile.d/conda.sh" >> ~/.bashrc && \ cat /renku/bashrc >> $HOME/.bashrc && \ echo "source ~/.bashrc" >> ~/.bash_profile -RUN pip install --no-cache-dir "jupyter-rsession-proxy==2.0.1" +RUN pip install --no-cache-dir "jupyter-rsession-proxy==2.2.0" # install IRKernel RUN R --quiet -e "install.packages('IRkernel')" && \ diff --git a/tests/cypress/e2e/jupyterlab.cy.ts b/tests/cypress/e2e/jupyterlab.cy.ts index 858fe936..8f2fad51 100644 --- a/tests/cypress/e2e/jupyterlab.cy.ts +++ b/tests/cypress/e2e/jupyterlab.cy.ts @@ -1,3 +1,46 @@ -import { basicJupyterTests } from "@renku/notebooks-cypress-tests"; +import { + jupyterlabTestFuncs, + registerCustomCommands, + validateLogin, +} from "@renku/notebooks-cypress-tests"; -basicJupyterTests(Cypress.env("URL")); +const username = Cypress.env("USERNAME"); +const password = Cypress.env("PASSWORD"); +const url_or_path = Cypress.env("URL"); +const url = + url_or_path.slice(-1) === "/" ? url_or_path.slice(0, -1) : url_or_path; + +describe("Test jupyter notebook", () => { + before(() => { + registerCustomCommands(); + }); + beforeEach(() => { + cy.session( + "login-rstudio", + () => { + cy.visit(url); + cy.renkuLoginIfRequired(username, password); + }, + { + validate: () => validateLogin(username, password), + } + ); + cy.visit(url); + cy.wait(100); + }); + it("Successfully loads", jupyterlabTestFuncs.findExpectedElements); + it("Can launch a terminal", jupyterlabTestFuncs.launchTerminal); + it( + "Can run terminal command to create a file", + jupyterlabTestFuncs.makeFileWithTerminal("new-file.txt") + ); + it( + "Can remove the file", + jupyterlabTestFuncs.removeFileWithTerminal("new-file.txt") + ); + it("Can close the terminal", jupyterlabTestFuncs.closeTerminal); + it( + "Can find expected start page elements again", + jupyterlabTestFuncs.findExpectedElements + ); +}); diff --git a/tests/cypress/e2e/rstudio.cy.ts b/tests/cypress/e2e/rstudio.cy.ts index 3c575f8d..1f59b8ae 100644 --- a/tests/cypress/e2e/rstudio.cy.ts +++ b/tests/cypress/e2e/rstudio.cy.ts @@ -1,3 +1,46 @@ -import { basicRstudioTests } from "@renku/notebooks-cypress-tests"; +import { + rstudioTestFuncs, + registerCustomCommands, + validateLogin, +} from "@renku/notebooks-cypress-tests"; -basicRstudioTests(Cypress.env("URL")); +const username = Cypress.env("USERNAME"); +const password = Cypress.env("PASSWORD"); +const url_or_path = Cypress.env("URL"); +const url = + url_or_path.slice(-1) === "/" ? url_or_path.slice(0, -1) : url_or_path; + +describe("Basic Rstudio functionality", () => { + before(() => { + registerCustomCommands(); + }); + beforeEach(() => { + cy.session( + "login-rstudio", + () => { + cy.visit(url); + cy.renkuLoginIfRequired(username, password); + }, + { + validate: () => validateLogin(username, password), + } + ); + cy.visit(url); + cy.wait(100); + }); + it("Successfully loads", rstudioTestFuncs.findExpectedElements); + it("Can launch a terminal", rstudioTestFuncs.launchTerminal); + it( + "Can run terminal command to create a file", + rstudioTestFuncs.makeFileWithTerminal("new-file.txt") + ); + it( + "Can remove the file", + rstudioTestFuncs.removeFileWithTerminal("new-file.txt") + ); + it("Can close the terminal", rstudioTestFuncs.closeTerminal); + it( + "Can find expected start page elements again", + rstudioTestFuncs.findExpectedElements + ); +}); diff --git a/tests/index.ts b/tests/index.ts index 0996b3dc..4812f054 100644 --- a/tests/index.ts +++ b/tests/index.ts @@ -63,7 +63,7 @@ describe(`Starting container with image ${imageName} and name ${containerName}`, configFile: "cypress.config.ts", browser: "chrome" }) - assert_(!results.totalFailed, `Tests failed with errors on chrome.`) + assert_(results.status !== 'failed' && !results.totalFailed, `Tests failed with errors on chrome.`) }); after(async function () { console.log(`Stopping container with image ${imageName} and name ${containerName}`) diff --git a/tests/package-lock.json b/tests/package-lock.json index 8f54a75f..f6f1a681 100644 --- a/tests/package-lock.json +++ b/tests/package-lock.json @@ -9,11 +9,11 @@ "version": "0.0.1", "license": "ISC", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.7", + "@renku/notebooks-cypress-tests": "^0.0.11", "@types/node": "^18.7.18", "axios": "^1.6.0", "axios-cookiejar-support": "^4.0.3", - "cypress": "^10.8.0", + "cypress": "^13.7.1", "mocha": "^9.2.2", "ts-node": "^10.9.1", "typescript": "^4.8.3" @@ -115,13 +115,75 @@ } }, "node_modules/@renku/notebooks-cypress-tests": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.7.tgz", - "integrity": "sha512-UX/7UqngTtjAgf8WUGk3o6n2XGZyNEnxXTJLvDWihgJQNTG9+Usg1baK7r4meMO4Li3mhtVXIkb8W/EMU8xS9w==", + "version": "0.0.11", + "resolved": "git+ssh://git@github.com/leafty/notebooks-cypress-tests.git#998453ad7965192f729971cc2846e1bab70ae905", "dev": true, + "license": "ISC", "dependencies": { - "cypress": "^10.8.0", - "cypress-network-idle": "^1.10.0" + "cypress": "^11.0.1" + } + }, + "node_modules/@renku/notebooks-cypress-tests/node_modules/@types/node": { + "version": "14.18.63", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", + "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", + "dev": true + }, + "node_modules/@renku/notebooks-cypress-tests/node_modules/cypress": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + }, + "bin": { + "cypress": "bin/cypress" + }, + "engines": { + "node": ">=12.0.0" } }, "node_modules/@tsconfig/node10": { @@ -808,30 +870,29 @@ } }, "node_modules/cypress": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz", - "integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==", + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.1.tgz", + "integrity": "sha512-4u/rpFNxOFCoFX/Z5h+uwlkBO4mWzAjveURi3vqdSu56HPvVdyGTxGw4XKGWt399Y1JwIn9E1L9uMXQpc0o55w==", "dev": true, "hasInstallScript": true, "dependencies": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", + "buffer": "^5.7.1", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", - "debug": "^4.3.2", + "debug": "^4.3.4", "enquirer": "^2.3.6", "eventemitter2": "6.4.7", "execa": "4.1.0", @@ -840,18 +901,19 @@ "figures": "^3.2.0", "fs-extra": "^9.1.0", "getos": "^3.2.1", - "is-ci": "^3.0.0", + "is-ci": "^3.0.1", "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", @@ -861,19 +923,68 @@ "cypress": "bin/cypress" }, "engines": { - "node": ">=12.0.0" + "node": "^16.0.0 || ^18.0.0 || >=20.0.0" } }, - "node_modules/cypress-network-idle": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/cypress-network-idle/-/cypress-network-idle-1.10.0.tgz", - "integrity": "sha512-TNtf9zquBCPMI79wMUCuVdA5jZEWJ1VN4VQ4nHngYOIKUtPKF+0LbcIxWxalyzGbPY6sTLyq4hprOxx+7mnAqA==", - "dev": true + "node_modules/cypress/node_modules/@cypress/request": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "dev": true, + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 6" + } }, - "node_modules/cypress/node_modules/@types/node": { - "version": "14.18.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.29.tgz", - "integrity": "sha512-LhF+9fbIX4iPzhsRLpK5H7iPdvW8L4IwGciXQIOEcuF62+9nw/VQVsOViAOOGxY3OlOKGLFv0sWwJXdwQeTn6A==", + "node_modules/cypress/node_modules/commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/cypress/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/cypress/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/dashdash": { @@ -1511,12 +1622,12 @@ } }, "node_modules/is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "dependencies": { - "ci-info": "^3.1.1" + "ci-info": "^3.2.0" }, "bin": { "is-ci": "bin.js" @@ -1880,10 +1991,13 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/mocha": { "version": "9.2.2", @@ -2147,6 +2261,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -2311,9 +2434,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2914,13 +3037,69 @@ } }, "@renku/notebooks-cypress-tests": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/@renku/notebooks-cypress-tests/-/notebooks-cypress-tests-0.0.7.tgz", - "integrity": "sha512-UX/7UqngTtjAgf8WUGk3o6n2XGZyNEnxXTJLvDWihgJQNTG9+Usg1baK7r4meMO4Li3mhtVXIkb8W/EMU8xS9w==", + "version": "git+ssh://git@github.com/leafty/notebooks-cypress-tests.git#998453ad7965192f729971cc2846e1bab70ae905", "dev": true, + "from": "@renku/notebooks-cypress-tests@^0.0.11", "requires": { - "cypress": "^10.8.0", - "cypress-network-idle": "^1.10.0" + "cypress": "^11.0.1" + }, + "dependencies": { + "@types/node": { + "version": "14.18.63", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", + "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", + "dev": true + }, + "cypress": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-11.2.0.tgz", + "integrity": "sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==", + "dev": true, + "requires": { + "@cypress/request": "^2.88.10", + "@cypress/xvfb": "^1.2.4", + "@types/node": "^14.14.31", + "@types/sinonjs__fake-timers": "8.1.1", + "@types/sizzle": "^2.3.2", + "arch": "^2.2.0", + "blob-util": "^2.0.2", + "bluebird": "^3.7.2", + "buffer": "^5.6.0", + "cachedir": "^2.3.0", + "chalk": "^4.1.0", + "check-more-types": "^2.24.0", + "cli-cursor": "^3.1.0", + "cli-table3": "~0.6.1", + "commander": "^5.1.0", + "common-tags": "^1.8.0", + "dayjs": "^1.10.4", + "debug": "^4.3.2", + "enquirer": "^2.3.6", + "eventemitter2": "6.4.7", + "execa": "4.1.0", + "executable": "^4.1.1", + "extract-zip": "2.0.1", + "figures": "^3.2.0", + "fs-extra": "^9.1.0", + "getos": "^3.2.1", + "is-ci": "^3.0.0", + "is-installed-globally": "~0.4.0", + "lazy-ass": "^1.6.0", + "listr2": "^3.8.3", + "lodash": "^4.17.21", + "log-symbols": "^4.0.0", + "minimist": "^1.2.6", + "ospath": "^1.2.2", + "pretty-bytes": "^5.6.0", + "proxy-from-env": "1.0.0", + "request-progress": "^3.0.0", + "semver": "^7.3.2", + "supports-color": "^8.1.1", + "tmp": "~0.2.1", + "untildify": "^4.0.0", + "yauzl": "^2.10.0" + } + } } }, "@tsconfig/node10": { @@ -3435,29 +3614,28 @@ } }, "cypress": { - "version": "10.8.0", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.8.0.tgz", - "integrity": "sha512-QVse0dnLm018hgti2enKMVZR9qbIO488YGX06nH5j3Dg1isL38DwrBtyrax02CANU6y8F4EJUuyW6HJKw1jsFA==", + "version": "13.7.1", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.7.1.tgz", + "integrity": "sha512-4u/rpFNxOFCoFX/Z5h+uwlkBO4mWzAjveURi3vqdSu56HPvVdyGTxGw4XKGWt399Y1JwIn9E1L9uMXQpc0o55w==", "dev": true, "requires": { - "@cypress/request": "^2.88.10", + "@cypress/request": "^3.0.0", "@cypress/xvfb": "^1.2.4", - "@types/node": "^14.14.31", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", "arch": "^2.2.0", "blob-util": "^2.0.2", "bluebird": "^3.7.2", - "buffer": "^5.6.0", + "buffer": "^5.7.1", "cachedir": "^2.3.0", "chalk": "^4.1.0", "check-more-types": "^2.24.0", "cli-cursor": "^3.1.0", "cli-table3": "~0.6.1", - "commander": "^5.1.0", + "commander": "^6.2.1", "common-tags": "^1.8.0", "dayjs": "^1.10.4", - "debug": "^4.3.2", + "debug": "^4.3.4", "enquirer": "^2.3.6", "eventemitter2": "6.4.7", "execa": "4.1.0", @@ -3466,38 +3644,74 @@ "figures": "^3.2.0", "fs-extra": "^9.1.0", "getos": "^3.2.1", - "is-ci": "^3.0.0", + "is-ci": "^3.0.1", "is-installed-globally": "~0.4.0", "lazy-ass": "^1.6.0", "listr2": "^3.8.3", "lodash": "^4.17.21", "log-symbols": "^4.0.0", - "minimist": "^1.2.6", + "minimist": "^1.2.8", "ospath": "^1.2.2", "pretty-bytes": "^5.6.0", + "process": "^0.11.10", "proxy-from-env": "1.0.0", "request-progress": "^3.0.0", - "semver": "^7.3.2", + "semver": "^7.5.3", "supports-color": "^8.1.1", "tmp": "~0.2.1", "untildify": "^4.0.0", "yauzl": "^2.10.0" }, "dependencies": { - "@types/node": { - "version": "14.18.29", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.29.tgz", - "integrity": "sha512-LhF+9fbIX4iPzhsRLpK5H7iPdvW8L4IwGciXQIOEcuF62+9nw/VQVsOViAOOGxY3OlOKGLFv0sWwJXdwQeTn6A==", + "@cypress/request": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@cypress/request/-/request-3.0.1.tgz", + "integrity": "sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "http-signature": "~1.3.6", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "performance-now": "^2.1.0", + "qs": "6.10.4", + "safe-buffer": "^5.1.2", + "tough-cookie": "^4.1.3", + "tunnel-agent": "^0.6.0", + "uuid": "^8.3.2" + } + }, + "commander": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, - "cypress-network-idle": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/cypress-network-idle/-/cypress-network-idle-1.10.0.tgz", - "integrity": "sha512-TNtf9zquBCPMI79wMUCuVdA5jZEWJ1VN4VQ4nHngYOIKUtPKF+0LbcIxWxalyzGbPY6sTLyq4hprOxx+7mnAqA==", - "dev": true - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -3939,12 +4153,12 @@ } }, "is-ci": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", - "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz", + "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==", "dev": true, "requires": { - "ci-info": "^3.1.1" + "ci-info": "^3.2.0" } }, "is-extglob": { @@ -4215,9 +4429,9 @@ } }, "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true }, "mocha": { @@ -4401,6 +4615,12 @@ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true + }, "proxy-from-env": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.0.0.tgz", @@ -4524,9 +4744,9 @@ "dev": true }, "semver": { - "version": "7.3.7", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", - "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "requires": { "lru-cache": "^6.0.0" diff --git a/tests/package.json b/tests/package.json index a8bd72ac..0e12b59f 100644 --- a/tests/package.json +++ b/tests/package.json @@ -9,11 +9,11 @@ "author": "", "license": "ISC", "devDependencies": { - "@renku/notebooks-cypress-tests": "^0.0.7", + "@renku/notebooks-cypress-tests": "^0.0.11", "@types/node": "^18.7.18", "axios": "^1.6.0", "axios-cookiejar-support": "^4.0.3", - "cypress": "^10.8.0", + "cypress": "^13.7.1", "mocha": "^9.2.2", "ts-node": "^10.9.1", "typescript": "^4.8.3"