Skip to content

Commit

Permalink
Further consolidate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhi committed Apr 15, 2022
1 parent efe1c8c commit 61befe5
Showing 1 changed file with 23 additions and 97 deletions.
120 changes: 23 additions & 97 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -87,7 +44,7 @@ jobs:
name: dist ${{ github.run_number }}
path: ./dist

install:
Test:
runs-on: ${{ matrix.os }}-latest
needs: [build]

Expand All @@ -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'
Expand All @@ -105,7 +64,6 @@ jobs:
jlab_version: 2.3.2

steps:

- name: Checkout
uses: actions/checkout@v2

Expand All @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 61befe5

Please sign in to comment.