|
28 | 28 | with: |
29 | 29 | python-version: '3.9' |
30 | 30 | architecture: 'x64' |
| 31 | + |
| 32 | + - uses: actions/cache@v2 |
| 33 | + with: |
| 34 | + path: ~/.cache/pip |
| 35 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 36 | + restore-keys: | |
| 37 | + ${{ runner.os }}-pip- |
| 38 | +
|
| 39 | + - name: Get yarn cache directory path |
| 40 | + id: yarn-cache-dir-path |
| 41 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 42 | + - uses: actions/cache@v2 |
| 43 | + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) |
| 44 | + with: |
| 45 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 46 | + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
| 47 | + restore-keys: | |
| 48 | + ${{ runner.os }}-yarn- |
| 49 | +
|
31 | 50 | - name: Install dependencies |
32 | 51 | run: | |
33 | 52 | python -m pip install --upgrade pip wheel |
@@ -65,52 +84,64 @@ jobs: |
65 | 84 | strategy: |
66 | 85 | fail-fast: false |
67 | 86 | matrix: |
68 | | - os: [ubuntu, macos, windows] |
| 87 | + os: [ubuntu, windows] |
69 | 88 | python: ['3.6', '3.9'] |
70 | | - dist: ['ipywidgets*.tar.gz', 'ipywidgets*.whl'] |
| 89 | + dist: ['ipywidgets*.tar.gz'] |
71 | 90 | include: |
72 | 91 | - python: '3.9' |
73 | 92 | dist: 'jupyterlab_widgets*.tar.gz' |
| 93 | + os: 'ubuntu' |
74 | 94 | - python: '3.9' |
75 | 95 | dist: 'widgetsnbextension*.tar.gz' |
76 | | - - os: windows |
77 | | - py_cmd: python |
78 | | - - os: macos |
79 | | - py_cmd: python3 |
80 | | - - os: ubuntu |
81 | | - py_cmd: python |
| 96 | + os: 'ubuntu' |
| 97 | + - python: '3.9' |
| 98 | + dist: 'ipywidgets*.whl' |
| 99 | + os: 'ubuntu' |
82 | 100 | steps: |
83 | 101 | - name: Install Python |
84 | 102 | uses: actions/setup-python@v2 |
85 | 103 | with: |
86 | 104 | python-version: ${{ matrix.python }} |
87 | 105 | architecture: 'x64' |
| 106 | + |
| 107 | + - name: Get pip cache dir |
| 108 | + id: pip-cache |
| 109 | + run: | |
| 110 | + echo "::set-output name=dir::$(pip cache dir)" |
| 111 | + - name: pip cache |
| 112 | + uses: actions/cache@v2 |
| 113 | + with: |
| 114 | + path: ${{ steps.pip-cache.outputs.dir }} |
| 115 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }} |
| 116 | + restore-keys: | |
| 117 | + ${{ runner.os }}-pip- |
| 118 | +
|
| 119 | + - name: Install the prerequisites |
| 120 | + run: | |
| 121 | + python -m pip install pip wheel |
88 | 122 | - uses: actions/download-artifact@v2 |
89 | 123 | with: |
90 | 124 | name: dist ${{ github.run_number }} |
91 | 125 | path: ./dist |
92 | | - - name: Install the prerequisites |
93 | | - run: | |
94 | | - ${{ matrix.py_cmd }} -m pip install pip wheel |
95 | 126 | - name: Install the package |
96 | 127 | run: | |
97 | 128 | cd dist |
98 | | - ${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }} |
| 129 | + python -m pip install -vv ${{ matrix.dist }} |
99 | 130 | - name: Validate environment |
100 | 131 | run: | |
101 | | - ${{ matrix.py_cmd }} -m pip freeze |
102 | | - ${{ matrix.py_cmd }} -m pip check |
| 132 | + python -m pip freeze |
| 133 | + python -m pip check |
103 | 134 | - name: Check the JupyterLab extension is installed |
104 | 135 | if: matrix.dist != 'widgetsnbextension*.tar.gz' |
105 | 136 | run: | |
106 | | - ${{ matrix.py_cmd }} -m pip install jupyterlab~=3.0 |
| 137 | + python -m pip install jupyterlab~=3.0 |
107 | 138 |
|
108 | 139 | jupyter labextension list |
109 | 140 | jupyter labextension list 2>&1 | grep -ie "@jupyter-widgets/jupyterlab-manager.*enabled.*ok" - |
110 | 141 | - name: Check the Classic Notebook extension is installed |
111 | 142 | if: matrix.dist != 'jupyterlab_widgets*.tar.gz' |
112 | 143 | run: | |
113 | | - ${{ matrix.py_cmd }} -m pip install notebook~=6.0 |
| 144 | + python -m pip install notebook~=6.0 |
114 | 145 |
|
115 | 146 | jupyter nbextension list |
116 | 147 | jupyter nbextension list 2>&1 | grep -ie "jupyter-js-widgets/extension.*enabled" - |
0 commit comments