-
Notifications
You must be signed in to change notification settings - Fork 6
128 lines (102 loc) · 3.09 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash -l {0}
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup conda
uses: mamba-org/setup-micromamba@main
with:
environment-file: dev-environment.yml
- name: Python linters
run: flake8 bqscales --ignore=E501,W504,W503
- name: jlpm install
run: jlpm install
- name: JS Linters
run: |
jlpm run prettier:check
jlpm run eslint:check
- name: Install bqscales
run: pip install .
- name: Check installation files
run: |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/bqscales
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqscales/extension.js
test -f $CONDA_PREFIX/share/jupyter/nbextensions/bqscales/index.js
test -d $CONDA_PREFIX/share/jupyter/labextensions/bqscales
test -f $CONDA_PREFIX/share/jupyter/labextensions/bqscales/package.json
- name: Print nbextension and labextension
run: |
jupyter nbextension list
jupyter labextension list
- name: Check nbextension and labextension
run: |
jupyter nbextension list 2>&1 | grep -ie "bqscales/extension.*enabled" -
jupyter labextension list 2>&1 | grep -ie "bqscales.*enabled.*ok" -
- name: Build Python package
run: python -m build
- name: Upload builds
uses: actions/upload-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
visual-regression-tests:
runs-on: ubuntu-latest
needs: [run]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: bqplot/bqplot
- name: Setup conda
uses: mamba-org/setup-micromamba@main
with:
environment-file: test-environment.yml
- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install the package
run: pip install -vv bqscales*.whl
working-directory: dist
- name: Install the package
run: pip install . -vvv
- name: Install Galata
run: |
jlpm install
jlpm playwright install chromium
working-directory: ui-tests
- name: Launch JupyterLab
run: jlpm run start:detached
working-directory: ui-tests
- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1
with:
resource: http-get://localhost:8888/api
timeout: 20000
- name: Run UI Tests
run: jlpm run test
working-directory: ui-tests
- name: Upload UI Test artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: ui-test-output
path: |
ui-tests/playwright-report
ui-tests/test-results