From 038b78309bf9348f4f3b1137131ac14d25095615 Mon Sep 17 00:00:00 2001 From: martinRenou Date: Tue, 29 Mar 2022 15:33:56 +0200 Subject: [PATCH] Fix CI --- .github/workflows/main.yml | 4 +- .github/workflows/ui-tests.yml | 42 ++++++++++++------- .../workflows/update_galata_references.yml | 17 ++++++-- 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59141344e..c22f08338 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -34,8 +34,8 @@ jobs: - name: Mamba install dependencies run: mamba install python=${{ matrix.python-version }} pip nodejs flake8 - - name: Mamba install JupyterLab 3 - run: mamba install jupyterlab=3 ipywidgets=7.6 openssl=1.1.1l + - name: Mamba install dependencies + run: mamba install jupyterlab ipywidgets openssl=1.1.1l - name: Install ipyleaflet run: pip install . diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 093db184d..5a77d7a1d 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -2,6 +2,11 @@ name: UI Tests on: [push, pull_request] + +defaults: + run: + shell: bash -l {0} + jobs: ui-tests: name: Visual Regression @@ -17,22 +22,30 @@ jobs: - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + - name: Setup conda + uses: conda-incubator/setup-miniconda@v2 + with: + mamba-version: "*" + channels: conda-forge + + - name: Mamba install dependencies + run: mamba install python=${{ matrix.python-version }} pip nodejs flake8 + + - name: Mamba install dependencies + run: mamba install jupyterlab ipywidgets openssl=1.1.1l + - name: Install ipyleaflet - run: | - python -m pip install --upgrade jupyterlab~=3.0 ipywidgets~=7.6 - python -m pip install . - cd ui-tests - jlpm install + run: pip install . - name: Install browser run: | - cd ui-tests + jlpm install jlpm playwright install chromium + working-directory: ui-tests - name: Launch JupyterLab - run: | - cd ui-tests - jlpm start-jlab:detached > /tmp/jupyterlab_server.log 2>&1 + run: jlpm start-jlab:detached > /tmp/jupyterlab_server.log 2>&1 + working-directory: ui-tests - name: Wait for JupyterLab uses: ifaxity/wait-on-action@v1 @@ -41,10 +54,8 @@ jobs: timeout: 360000 - name: Widget rendering tests - shell: bash - run: | - cd ui-tests - jlpm run test + run: jlpm run test + working-directory: ui-tests - name: Upload Playwright Test assets if: always() @@ -65,13 +76,12 @@ jobs: - name: Update snapshots if: failure() run: | - cd ui-tests # remove previous snapshots from other browser jlpm rimraf "tests/**/*-snapshots/*.png" # generate new snapshots jlpm run test:update + working-directory: ui-tests - name: Print JupyterLab logs if: always() - run: | - cat /tmp/jupyterlab_server.log + run: cat /tmp/jupyterlab_server.log diff --git a/.github/workflows/update_galata_references.yml b/.github/workflows/update_galata_references.yml index 1ac480f21..8fde52182 100644 --- a/.github/workflows/update_galata_references.yml +++ b/.github/workflows/update_galata_references.yml @@ -32,10 +32,21 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install dependencies + - name: Setup conda + uses: conda-incubator/setup-miniconda@v2 + with: + mamba-version: "*" + channels: conda-forge + + - name: Mamba install dependencies + run: mamba install python=${{ matrix.python-version }} pip nodejs flake8 + + - name: Mamba install dependencies + run: mamba install jupyterlab ipywidgets openssl=1.1.1l + + - name: Install ipyleaflet run: | - python -m pip install --upgrade jupyterlab~=3.0 ipywidgets~=7.6 - python -m pip install . + pip install . jlpm jlpm build jupyter labextension develop . --overwrite