|
9 | 9 | jobs:
|
10 | 10 | build:
|
11 | 11 | runs-on: ubuntu-latest
|
| 12 | + |
12 | 13 | steps:
|
13 |
| - - name: Checkout |
14 |
| - uses: actions/checkout@v2 |
15 |
| - - name: Install node |
16 |
| - uses: actions/setup-node@v1 |
17 |
| - with: |
18 |
| - node-version: '14.x' |
19 |
| - - name: Install Python |
20 |
| - uses: actions/setup-python@v2 |
21 |
| - with: |
22 |
| - python-version: '3.9' |
23 |
| - architecture: 'x64' |
24 |
| - |
25 |
| - - name: Setup pip cache |
26 |
| - uses: actions/cache@v2 |
27 |
| - with: |
28 |
| - path: ~/.cache/pip |
29 |
| - key: pip-3.8-${{ hashFiles('package.json') }} |
30 |
| - restore-keys: | |
31 |
| - pip-3.8- |
32 |
| - pip- |
33 |
| -
|
34 |
| - - name: Get yarn cache directory path |
35 |
| - id: yarn-cache-dir-path |
36 |
| - run: echo "::set-output name=dir::$(yarn cache dir)" |
37 |
| - - name: Setup yarn cache |
38 |
| - uses: actions/cache@v2 |
39 |
| - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
40 |
| - with: |
41 |
| - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
42 |
| - key: yarn-${{ hashFiles('**/yarn.lock') }} |
43 |
| - restore-keys: | |
44 |
| - yarn- |
45 |
| - - name: Install dependencies |
46 |
| - run: python -m pip install jupyterlab~=3.0 check-manifest |
47 |
| - - name: Build the extension |
48 |
| - run: | |
49 |
| - jlpm |
50 |
| - jlpm run eslint:check |
51 |
| - python -m pip install . |
52 |
| -
|
53 |
| - jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK" |
54 |
| - python -m jupyterlab.browser_check |
55 |
| -
|
56 |
| - - name: Build package |
57 |
| - run: | |
58 |
| - set -eux |
59 |
| - check-manifest -v |
60 |
| -
|
61 |
| - pip install build |
62 |
| - python -m build --sdist |
63 |
| - cp dist/*.tar.gz myextension.tar.gz |
64 |
| - pip uninstall -y myextension jupyterlab |
65 |
| - rm -rf myextension |
66 |
| -
|
67 |
| - - uses: actions/upload-artifact@v2 |
68 |
| - with: |
69 |
| - name: myextension-sdist |
70 |
| - path: myextension.tar.gz |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v3 |
| 16 | + |
| 17 | + - name: Base Setup |
| 18 | + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 19 | + |
| 20 | + - name: Install dependencies |
| 21 | + run: python -m pip install -U "jupyterlab>=4.0.0,<5" |
| 22 | + |
| 23 | + - name: Lint the extension |
| 24 | + run: | |
| 25 | + set -eux |
| 26 | + jlpm |
| 27 | + jlpm run lint:check |
| 28 | +
|
| 29 | + - name: Build the extension |
| 30 | + run: | |
| 31 | + set -eux |
| 32 | + python -m pip install .[test] |
| 33 | +
|
| 34 | + jupyter labextension list |
| 35 | + jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK" |
| 36 | + python -m jupyterlab.browser_check |
| 37 | +
|
| 38 | + - name: Package the extension |
| 39 | + run: | |
| 40 | + set -eux |
| 41 | +
|
| 42 | + pip install build |
| 43 | + python -m build |
| 44 | + pip uninstall -y "jupyterlab_kernelspy" jupyterlab |
| 45 | +
|
| 46 | + - name: Upload extension packages |
| 47 | + uses: actions/upload-artifact@v3 |
| 48 | + with: |
| 49 | + name: extension-artifacts |
| 50 | + path: dist/jupyterlab_kernelspy* |
| 51 | + if-no-files-found: error |
71 | 52 |
|
72 | 53 | test_isolated:
|
73 | 54 | needs: build
|
74 | 55 | runs-on: ubuntu-latest
|
75 | 56 |
|
76 | 57 | steps:
|
77 |
| - - name: Checkout |
78 |
| - uses: actions/checkout@v2 |
79 |
| - - name: Install Python |
80 |
| - uses: actions/setup-python@v2 |
81 |
| - with: |
82 |
| - python-version: '3.8' |
83 |
| - architecture: 'x64' |
84 |
| - - uses: actions/download-artifact@v2 |
85 |
| - with: |
86 |
| - name: myextension-sdist |
87 |
| - - name: Install and Test |
88 |
| - run: | |
89 |
| - set -eux |
90 |
| - # Remove NodeJS, twice to take care of system and locally installed node versions. |
91 |
| - sudo rm -rf $(which node) |
92 |
| - sudo rm -rf $(which node) |
93 |
| - pip install myextension.tar.gz |
94 |
| - pip install jupyterlab |
95 |
| - jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK" |
96 |
| - python -m jupyterlab.browser_check --no-chrome-test |
| 58 | + - name: Install Python |
| 59 | + uses: actions/setup-python@v4 |
| 60 | + with: |
| 61 | + python-version: '3.9' |
| 62 | + architecture: 'x64' |
| 63 | + - uses: actions/download-artifact@v3 |
| 64 | + with: |
| 65 | + name: extension-artifacts |
| 66 | + - name: Install and Test |
| 67 | + run: | |
| 68 | + set -eux |
| 69 | + # Remove NodeJS, twice to take care of system and locally installed node versions. |
| 70 | + sudo rm -rf $(which node) |
| 71 | + sudo rm -rf $(which node) |
| 72 | +
|
| 73 | + pip install "jupyterlab>=4.0.0,<5" jupyterlab_kernelspy*.whl |
| 74 | +
|
| 75 | +
|
| 76 | + jupyter labextension list |
| 77 | + jupyter labextension list 2>&1 | grep -ie "jupyterlab-kernelspy.*OK" |
| 78 | + python -m jupyterlab.browser_check --no-browser-test |
| 79 | +
|
| 80 | +
|
| 81 | + check_links: |
| 82 | + name: Check Links |
| 83 | + runs-on: ubuntu-latest |
| 84 | + timeout-minutes: 15 |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v3 |
| 87 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 88 | + - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 |
0 commit comments