88 branches :
99 - master
1010
11+ defaults :
12+ run :
13+ shell : bash -l {0}
14+
1115jobs :
1216 run :
1317 runs-on : ${{ matrix.os }}
1418
1519 strategy :
1620 fail-fast : false
1721 matrix :
18- os : [ubuntu-latest, macos-latest ]
19- python-version : [3.7, 3. 8]
22+ os : [ubuntu-latest]
23+ python-version : [3.8]
2024
2125 steps :
2226 - name : Checkout
@@ -25,19 +29,17 @@ jobs:
2529 - name : Setup conda
2630 uses : conda-incubator/setup-miniconda@v2
2731 with :
32+ activate-environment : ipycanvas-dev
33+ environment-file : dev-environment.yml
34+ python-version : ${{ matrix.python-version }}
2835 mamba-version : " *"
36+ auto-activate-base : false
2937 channels : conda-forge
3038
31- - name : Mamba install dependencies
32- shell : bash -l {0}
33- run : mamba install python=${{ matrix.python-version }} pip nodejs ipywidgets=7.6 jupyter jupyterlab=3 pillow numpy flake8
34-
3539 - name : Install ipycanvas
36- shell : bash -l {0}
3740 run : pip install -e .
3841
3942 - name : Check installation files
40- shell : bash -l {0}
4143 run : |
4244 test -d $CONDA_PREFIX/share/jupyter/nbextensions/ipycanvas
4345 test -f $CONDA_PREFIX/share/jupyter/nbextensions/ipycanvas/extension.js
@@ -46,11 +48,100 @@ jobs:
4648 test -f $CONDA_PREFIX/share/jupyter/labextensions/ipycanvas/package.json
4749
4850 - name : Check nbextension and labextension
49- shell : bash -l {0}
5051 run : |
5152 jupyter nbextension list 2>&1 | grep -ie "ipycanvas/extension.*enabled" -
5253 jupyter labextension list 2>&1 | grep -ie "ipycanvas.*enabled.*ok" -
5354
5455 - name : Test flake8
55- shell : bash -l {0}
5656 run : flake8 ipycanvas --ignore=E501,W504,W503
57+
58+ build :
59+ runs-on : ubuntu-latest
60+ steps :
61+
62+ - name : Checkout
63+ uses : actions/checkout@v2
64+
65+ - name : Setup conda
66+ uses : conda-incubator/setup-miniconda@v2
67+ with :
68+ activate-environment : ipycanvas-dev
69+ environment-file : dev-environment.yml
70+ python-version : ${{ matrix.python-version }}
71+ mamba-version : " *"
72+ auto-activate-base : false
73+ channels : conda-forge
74+
75+ - name : Build packages
76+ run : |
77+ python setup.py sdist bdist_wheel
78+ cd dist
79+ sha256sum * | tee SHA256SUMS
80+
81+ - name : Upload builds
82+ uses : actions/upload-artifact@v2
83+ with :
84+ name : dist ${{ github.run_number }}
85+ path : ./dist
86+
87+ install :
88+ runs-on : ${{ matrix.os }}-latest
89+ needs : [build]
90+
91+ strategy :
92+ fail-fast : false
93+ matrix :
94+ os : [ubuntu, macos]
95+ python : ['3.6', '3.9']
96+ include :
97+ - python : ' 3.6'
98+ dist : ' ipycanvas*.tar.gz'
99+ jlab_version : 3
100+ - python : ' 3.9'
101+ dist : ' ipycanvas*.whl'
102+ jlab_version : 2
103+
104+ steps :
105+
106+ - name : Checkout
107+ uses : actions/checkout@v2
108+
109+ - name : Setup conda
110+ uses : conda-incubator/setup-miniconda@v2
111+ with :
112+ python-version : ${{ matrix.python-version }}
113+ mamba-version : " *"
114+ auto-activate-base : false
115+ channels : conda-forge
116+
117+ - name : Install dependencies
118+ run : mamba install python=${{ matrix.python-version }} pip yarn jupyterlab=${{ matrix.jlab_version }} ipywidgets jupyter-packaging
119+
120+ - uses : actions/download-artifact@v2
121+ with :
122+ name : dist ${{ github.run_number }}
123+ path : ./dist
124+
125+ - name : Install the package
126+ run : |
127+ cd dist
128+ pip install -vv ${{ matrix.dist }}
129+
130+ - name : Manually install labextension for lab2
131+ if : ${{ matrix.jlab_version }} == 2
132+ run : jupyter labextension install .
133+
134+ - name : Test installation files
135+ run : |
136+ test -d $CONDA_PREFIX/share/jupyter/nbextensions/ipycanvas
137+ test -f $CONDA_PREFIX/share/jupyter/nbextensions/ipycanvas/extension.js
138+ test -f $CONDA_PREFIX/share/jupyter/nbextensions/ipycanvas/index.js
139+ test -d $CONDA_PREFIX/share/jupyter/labextensions/ipycanvas
140+ test -f $CONDA_PREFIX/share/jupyter/labextensions/ipycanvas/package.json
141+ test -d $CONDA_PREFIX/share/jupyter/labextensions/ipycanvas/static
142+
143+ - name : Validate the nbextension
144+ run : jupyter nbextension list 2>&1 | grep "ipycanvas/extension"
145+
146+ - name : Validate the labextension
147+ run : jupyter labextension list 2>&1 | grep ipycanvas
0 commit comments