@@ -21,47 +21,18 @@ jobs:
2121 - name : Checkout
2222 uses : actions/checkout@v2
2323
24- - name : Checkout
25- uses : actions/checkout@v2
26- with :
27- repository : ' bqplot/bqplot'
28- path : ' bqplot'
29-
30- - name : Setup conda
31- uses : conda-incubator/setup-miniconda@v2
24+ - name : Install Conda environment with Micromamba
25+ uses : mamba-org/provision-with-micromamba@main
3226 with :
33- activate- environment : bqplot-gl-test
27+ environment-name : bqplot-gl-test
3428 environment-file : test-environment.yml
35- python-version : ${{ matrix.python-version }}
36- mamba-version : " *"
37- auto-activate-base : false
3829 channels : conda-forge
3930
4031 - name : Install bqplot
41- run : pip install .
42- working-directory : bqplot
43-
44- - name : Yarn build bqplot
45- run : |
46- yarn install
47- yarn run build
48- working-directory : bqplot/js
49-
50- - name : Yarn install bqplot-gl
51- run : yarn install
52-
53- - name : Patch node_modules/bqplot
54- run : |
55- rm -rf bqplot
56- ln -s $GITHUB_WORKSPACE/bqplot/js bqplot
57- ls bqplot
58- working-directory : node_modules
59-
60- - name : Yarn build
61- run : yarn run build
32+ run : pip install --pre bqplot
6233
6334 - name : Install bqplot-gl
64- run : pip install .
35+ run : pip install . -vvv
6536
6637 - name : Test installation files
6738 run : |
@@ -82,76 +53,34 @@ jobs:
8253 run : flake8 bqplot_gl --ignore=E501,W504,W503
8354
8455 - name : JavaScript prettyfier
85- run : yarn run prettier:check
86-
87- - name : JavaScript tests
88- run : yarn run test
89-
90- - name : Install Galata
91- run : yarn install
92- working-directory : ui-tests
93-
94- - name : Launch JupyterLab
95- run : yarn run start-jlab:detached
96- working-directory : ui-tests
97-
98- - name : Wait for JupyterLab
99- uses : ifaxity/wait-on-action@v1
100- with :
101- resource : http-get://localhost:8888/api
102- timeout : 20000
103-
104- - name : Run UI Tests
105- run : yarn run test
106- working-directory : ui-tests
107-
108- - name : Upload UI Test artifacts
109- if : always()
110- uses : actions/upload-artifact@v2
111- with :
112- name : ui-test-output
113- path : ui-tests/test-output
56+ run : jlpm run prettier:check
11457
11558 - name : Build Python package
116- run : |
117- python setup.py sdist bdist_wheel
118- cd dist
119- sha256sum * | tee SHA256SUMS
120-
121- - name : Pack JavaScript package
122- run : |
123- yarn pack
124- mv bqplot*.tgz ../dist
59+ run : python -m build
12560
12661 - name : Upload builds
12762 uses : actions/upload-artifact@v2
12863 with :
12964 name : dist ${{ github.run_number }}
13065 path : ./dist
13166
132- install :
133- runs-on : ${{ matrix.os }} -latest
67+ visual-regression-tests :
68+ runs-on : ubuntu -latest
13469 needs : [build]
13570
13671 strategy :
13772 fail-fast : false
138- matrix :
139- os : [ubuntu, macos, windows]
140- python : ['3.9']
14173
14274 steps :
14375
14476 - name : Checkout
14577 uses : actions/checkout@v2
14678
147- - name : Setup conda
148- uses : conda-incubator/setup-miniconda@v2
79+ - name : Install Conda environment with Micromamba
80+ uses : mamba-org/provision-with-micromamba@main
14981 with :
150- activate- environment : bqplot-gl-test
82+ environment-name : bqplot-gl-test
15183 environment-file : test-environment.yml
152- python-version : ${{ matrix.python-version }}
153- mamba-version : " *"
154- auto-activate-base : false
15584 channels : conda-forge
15685
15786 - uses : actions/download-artifact@v2
@@ -164,17 +93,35 @@ jobs:
16493 cd dist
16594 pip install -vv bqplot*.whl
16695
167- - name : Test installation files
168- run : |
169- test -d $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl
170- test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/extension.js
171- test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqplot-gl/index.js
172- test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl
173- test -f $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/package.json
174- test -d $CONDA_PREFIX/share/jupyter/labextensions/bqplot-gl/static
175-
176- - name : Validate the nbextension
177- run : jupyter nbextension list 2>&1 | grep "bqplot-gl/extension"
178-
179- - name : Validate the labextension
180- run : jupyter labextension list 2>&1 | grep bqplot-gl
96+ - name : Install dependencies
97+ shell : bash -l {0}
98+ working-directory : ui-tests
99+ env :
100+ PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : 1
101+ run : jlpm install
102+
103+ - name : Set up browser cache
104+ uses : actions/cache@v3
105+ with :
106+ path : |
107+ ${{ github.workspace }}/pw-browsers
108+ key : ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
109+
110+ - name : Install browser
111+ shell : bash -l {0}
112+ run : npx playwright install chromium
113+ working-directory : ui-tests
114+
115+ - name : Execute integration tests
116+ shell : bash -l {0}
117+ working-directory : ui-tests
118+ run : npx playwright test
119+
120+ - name : Upload Playwright Test report
121+ if : always()
122+ uses : actions/upload-artifact@v3
123+ with :
124+ name : bqplot-playwright-tests
125+ path : |
126+ ui-tests/test-results
127+ ui-tests/playwright-report
0 commit comments