|
8 | 8 |
|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 |
| - runs-on: ubuntu-latest |
| 11 | + runs-on: ${{ matrix.os }} |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + os: [ubuntu-latest, windows-latest, macos-latest] |
| 16 | + python-version: ["3.7", "3.10"] |
12 | 17 | steps:
|
13 | 18 | - name: Checkout
|
14 | 19 | uses: actions/checkout@v2
|
15 | 20 |
|
16 |
| - - name: Install node |
17 |
| - uses: actions/setup-node@v2 |
18 |
| - with: |
19 |
| - node-version: "12.x" |
20 |
| - |
21 |
| - - name: Install Python |
22 |
| - uses: actions/setup-python@v2 |
23 |
| - with: |
24 |
| - python-version: "3.7" |
25 |
| - architecture: "x64" |
26 |
| - |
27 |
| - - name: Setup pip cache |
28 |
| - uses: actions/cache@v2 |
29 |
| - with: |
30 |
| - path: ~/.cache/pip |
31 |
| - key: pip-3.7-${{ hashFiles('package.json') }} |
32 |
| - restore-keys: | |
33 |
| - pip-3.7- |
34 |
| - pip- |
35 |
| -
|
36 |
| - - name: Get npm cache directory |
37 |
| - id: npm-cache |
38 |
| - run: | |
39 |
| - echo "::set-output name=dir::$(npm config get cache)" |
40 |
| -
|
41 |
| - - uses: actions/cache@v2 |
42 |
| - with: |
43 |
| - path: ${{ steps.npm-cache.outputs.dir }} |
44 |
| - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} |
45 |
| - restore-keys: | |
46 |
| - ${{ runner.os }}-node- |
| 21 | + - uses: jupyterlab/maintainer-tools/.github/base-setup@v1 |
47 | 22 |
|
48 | 23 | - name: Install dependencies
|
49 | 24 | run: |
|
50 |
| - python -m pip install -U pip setuptools cookiecutter |
| 25 | + python -m pip install -U cookiecutter |
51 | 26 |
|
52 | 27 | - name: Test the extension
|
53 | 28 | run: |
|
|
68 | 43 | python -m pytest --check-links
|
69 | 44 | popd
|
70 | 45 |
|
71 |
| - - name: Make a non-local install so the data_files get populated |
| 46 | + - name: Validate extension usage |
72 | 47 | run: |
|
73 |
| - pip uninstall -y jupyter_widget_testwidgets |
74 |
| - pushd jupyter-widget-testwidgets |
75 |
| -
|
76 |
| - pip install . |
77 |
| -
|
78 | 48 | # Validate nbextension (enable does not use exit code):
|
79 | 49 | jupyter nbextension enable --py --sys-prefix jupyter_widget_testwidgets
|
80 | 50 | python -c "from notebook.nbextensions import validate_nbextension; import sys; sys.exit(validate_nbextension('jupyter_widget_testwidgets/extension') or 0)"
|
|
0 commit comments