File: packaging.yml

package info (click to toggle)
ipywidgets 8.1.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,520 kB
  • sloc: python: 7,041; javascript: 1,764; sh: 62; makefile: 36
file content (147 lines) | stat: -rw-r--r-- 3,915 bytes parent folder | download
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Packaging

on:
  push:
    branches:
      - main
  pull_request:
    branches: '*'

env:
  PIP_DISABLE_PIP_VERSION_CHECK: 1

defaults:
  run:
    shell: bash -l {0}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'
          architecture: 'x64'

      - uses: actions/cache@v3
        with:
          path: ~/.cache/pip
          key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip wheel build jupyterlab

      - name: Build PyPI distributions for ipywidgets
        run: |
          mkdir -p dist/
          cd python/ipywidgets
          pyproject-build .
          cp ./dist/* ../../dist

      - name: Install node dependencies
        run: |
          jlpm

      - name: Build JS
        run: |
          jlpm build

      - name: Build PyPI distributions for jupyterlab_widgets
        run: |
          cd python/jupyterlab_widgets
          pyproject-build .
          cp ./dist/* ../../dist

      - name: Build PyPI distributions for widgetsnbextension
        run: |
          cd python/widgetsnbextension
          pyproject-build .
          cp ./dist/* ../../dist

      - name: Build checksum file
        run: |
          cd dist
          sha256sum * | tee SHA256SUMS

      - name: Upload distributions
        uses: actions/upload-artifact@v3
        with:
          name: dist ${{ github.run_number }}
          path: ./dist

  install:
    runs-on: ${{ matrix.os }}-latest
    needs: [build]
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu, windows]
        python: ['3.7', '3.10']
        dist: ['ipywidgets*.tar.gz']
        include:
          - python: '3.10'
            dist: 'jupyterlab_widgets*.tar.gz'
            os: 'ubuntu'
          - python: '3.10'
            dist: 'widgetsnbextension*.tar.gz'
            os: 'ubuntu'
          - python: '3.10'
            dist: 'ipywidgets*.whl'
            os: 'ubuntu'
    steps:
      - name: Install Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python }}
          architecture: 'x64'
      - name: Checkout # For the cache keys
        uses: actions/checkout@v3

      - name: Get pip cache dir
        id: pip-cache
        run: |
          echo "::set-output name=dir::$(pip cache dir)"
      - name: pip cache
        uses: actions/cache@v3
        with:
          path: ${{ steps.pip-cache.outputs.dir }}
          key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
          restore-keys: |
            ${{ runner.os }}-pip-

      - name: Install the prerequisites
        run: |
          python -m pip install pip
      - uses: actions/download-artifact@v3
        with:
          name: dist ${{ github.run_number }}
          path: ./dist
      - name: Install the package
        run: |
          cd dist
          python -m pip install -vv ${{ matrix.dist }}
      - name: Validate environment
        run: |
          python -m pip freeze
          python -m pip check
      - name: Check the JupyterLab extension is installed
        if: matrix.dist != 'widgetsnbextension*.tar.gz'
        run: |
          python -m pip install jupyterlab~=3.0

          jupyter labextension list
          jupyter labextension list 2>&1 | grep -ie "@jupyter-widgets/jupyterlab-manager.*enabled.*ok" -
      - name: Check the Classic Notebook extension is installed
        if: matrix.dist != 'jupyterlab_widgets*.tar.gz'
        run: |
          python -m pip install notebook~=6.0

          jupyter nbextension list
          jupyter nbextension list 2>&1 | grep -ie "jupyter-js-widgets/extension.*enabled" -