add environment #10
This file contains 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: Build | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['*'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'yarn' | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
cache: 'pip' # caching pip dependencies | |
# architecture: 'x64' | |
- name: Install test dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install build hatch "jupyterlab>=4.0.0,<5" "hatch-nodejs-version" | |
- name: Lint the extension | |
run: | | |
set -eux | |
jlpm | |
jlpm run lint:check | |
- name: Build the extension | |
run: | | |
set -eux | |
python -m pip install . | |
jupyter labextension list | |
jupyter labextension list 2>&1 | grep -ie "jupyterlab-logout.*OK" | |
python -m jupyterlab.browser_check | |
- name: Build package | |
run: | | |
python -m build |