Migration from jupyter widget 7.x to 8.x and from jupyter packaging to hatch jupyter builder #152
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, macos-latest] | |
| python-version: [3.12] | |
| yarn-version: [1.22.22] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| mamba-version: "*" | |
| channels: conda-forge,defaults | |
| - name: Mamba install dependencies | |
| run: mamba install python=${{ matrix.python-version }} pip nodejs yarn=${{ matrix.yarn-version }} | |
| - name: Mamba install JupyterLab 4 | |
| run: mamba install jupyterlab=4.4.3 ipywidgets=8.1.7 | |
| - name: Install here-map-widget-for-jupyter | |
| run: | | |
| npm config set @here:registry https://repo.platform.here.com/artifactory/api/npm/maps-api-for-javascript | |
| pip install .[dev] | |
| - name: Check installation files | |
| run: | | |
| echo "CONDA_PREFIX=$CONDA_PREFIX" | |
| test -d $CONDA_PREFIX/share/jupyter/nbextensions/@here/map-widget-for-jupyter | |
| test -f $CONDA_PREFIX/share/jupyter/nbextensions/@here/map-widget-for-jupyter/extension.js | |
| test -f $CONDA_PREFIX/share/jupyter/nbextensions/@here/map-widget-for-jupyter/index.js | |
| test -d $CONDA_PREFIX/share/jupyter/labextensions/@here/map-widget-for-jupyter | |
| test -f $CONDA_PREFIX/share/jupyter/labextensions/@here/map-widget-for-jupyter/package.json | |
| - name: Lint check | |
| run: make lint | |
| - name: Import check | |
| run: python -c 'import here_map_widget' | |
| - name: Build the package (Only on Linux for saving time) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| pip install hatch | |
| hatch build | |
| - name: Build docs (Only on Linux for saving time) | |
| if: matrix.os == 'ubuntu-latest' | |
| env: | |
| XYZ_TOKEN: ${{ secrets.XYZ_TOKEN }} | |
| LS_API_KEY: ${{ secrets.LS_API_KEY }} | |
| run: | | |
| mamba install sphinx sphinx_rtd_theme | |
| pip install -r docs/requirements.txt | |
| cd docs | |
| make html |