diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fcbc6f2c..c45031a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,49 +15,6 @@ defaults: shell: bash -l {0} jobs: - run: - runs-on: ${{ matrix.os }} - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - python-version: [3.8] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: ipympl-dev - environment-file: dev-environment.yml - python-version: ${{ matrix.python-version }} - mamba-version: "*" - auto-activate-base: false - channels: conda-forge - - - name: Install ipympl - run: | - python -m build - pip install dist/*.whl - - - name: Check installation files - run: | - test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib - test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/extension.js - test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/index.js - test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib - test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib/package.json - - - name: Check nbextension and labextension - run: | - jupyter nbextension list 2>&1 | grep -ie "jupyter-matplotlib/extension.*enabled" - - jupyter labextension list 2>&1 | grep -ie "jupyter-matplotlib.*enabled.*ok" - - - - name: Run tests - run: pytest . - build: runs-on: ubuntu-latest steps: @@ -87,7 +44,7 @@ jobs: name: dist ${{ github.run_number }} path: ./dist - install: + Test: runs-on: ${{ matrix.os }}-latest needs: [build] @@ -96,6 +53,8 @@ jobs: matrix: os: [ubuntu, macos] python: ['3.6', '3.9'] + mpl-version: ['3.5', 'latest'] + ipywidgets-version: ['7.7', 'latest'] include: - python: '3.6' dist: 'ipympl*.tar.gz' @@ -105,7 +64,6 @@ jobs: jlab_version: 2.3.2 steps: - - name: Checkout uses: actions/checkout@v2 @@ -118,7 +76,23 @@ jobs: channels: conda-forge - name: Install dependencies - run: mamba install python=${{ matrix.python-version }} pip yarn jupyterlab=${{ matrix.jlab_version }} ipywidgets jupyter-packaging + run: mamba install python=${{ matrix.python-version }} pip yarn jupyterlab=${{ matrix.jlab_version }} jupyter-packaging + + - if: ${{ matrix.mpl-version }} == 'latest' + name: Install latest Matplotlib + run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple matplotlib + + - if: ${{ matrix.mpl-version }} != 'latest' + name: Install matplotlib pinned + run: mamba install matplotlib=${{ matrix.matplotlib-version}}.* + + - if: ${{ matrix.ipywidgets-version }} == 'latest' + name: Install latest ipywidgets + run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple ipywidgets + + - if: ${{ matrix.ipywidgets-version }} != 'latest' + name: Install ipywidgets pinned + run: mamba install ipywidgets - uses: actions/download-artifact@v2 with: @@ -151,58 +125,10 @@ jobs: - name: Validate the labextension run: jupyter labextension list 2>&1 | grep jupyter-matplotlib - visual-regression-tests: - runs-on: ${{ matrix.os }}-latest - needs: [build] - - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - mpl-version: ['3.5', 'latest'] - ipywidgets-version: ['7.7', 'latest'] - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v2 - with: - python-version: 3.9 - mamba-version: "*" - auto-activate-base: false - channels: conda-forge - - - if: ${{ matrix.mpl-version }} == 'latest' - name: Install latest Matplotlib - run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple matplotlib - - - if: ${{ matrix.mpl-version }} != 'latest' - name: Install matplotlib pinned - run: mamba install matplotlib=${{ matrix.matplotlib-version}}.* - - - if: ${{ matrix.ipywidgets-version }} == 'latest' - name: Install latest ipywidgets - run: pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple ipywidgets - - - if: ${{ matrix.ipywidgets-version }} != 'latest' - name: Install ipywidgets pinned - run: mamba install ipywidgets - - - name: Install dependencies - run: mamba install pip yarn jupyterlab=3.0.11 jupyter-packaging - - - uses: actions/download-artifact@v2 - with: - name: dist ${{ github.run_number }} - path: ./dist - - - name: Install the package - run: pip install -vv ipympl*.whl - working-directory: dist + - name: Run pytest + run: pytest . - - name: Install test dependencies + - name: Install Galata test dependencies run: yarn install working-directory: ui-tests