Skip to content

Add version badges for npm, PyPI, and conda-forge to README (#188) #25

Add version badges for npm, PyPI, and conda-forge to README (#188)

Add version badges for npm, PyPI, and conda-forge to README (#188) #25

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4,<5"
- name: Check lockfiles are deduplicated
run: |
set -eux
jlpm dedupe --check
cd ui-tests
jlpm dedupe --check
- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check
- name: Validate extension examples compile
run: |
set -eux
jlpm run check:extension-examples
- name: Build the extension
run: |
set -eux
python -m pip install .[test]
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/plugin-playground.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlab_plugin_playground" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/jupyterlab_plugin_playground*
if-no-files-found: error
test_isolated:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.14']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'
- uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
pip install "jupyterlab>=4,<5" jupyterlab_plugin_playground*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlab/plugin-playground.*OK"
python -m jupyterlab.browser_check --no-chrome-test
integration_tests:
name: Integration tests
needs: build
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Download extension package
uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4,<5" jupyterlab_plugin_playground*.whl
- name: Install ui-tests dependencies
working-directory: ui-tests
run: jlpm install
- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
- name: Install browser
working-directory: ui-tests
run: |
set -eux
jlpm playwright install chromium
- name: Execute integration tests
working-directory: ui-tests
run: |
set -eux
jlpm test
- name: Validate exported wheel archive
run: |
set -eux
python -m pip install twine wheel
wheel_file="/tmp/playground_wheel_installed_smoke-0.1.0-py3-none-any.whl"
test -f "$wheel_file"
python -m twine check "$wheel_file"
python -m wheel unpack "$wheel_file" --dest /tmp/plugin-playground-exported-wheel-unpacked
- name: Install exported wheel and run installed-wheel smoke test
working-directory: ui-tests
run: |
set -eux
python -m pip install --force-reinstall /tmp/playground_wheel_installed_smoke-0.1.0-py3-none-any.whl
PLAYGROUND_TEST_INSTALLED_WHEEL=1 jlpm playwright test tests/wheel-installed.spec.ts --workers=1
- name: Execute docs screenshot tests
working-directory: ui-tests
run: |
set -eux
jlpm test:docs-screenshots
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report
ui-tests/test-results-docs-screenshots
ui-tests/playwright-report-docs-screenshots
integration_tests_notebook_v7:
name: Integration tests (Notebook v7)
needs: build
runs-on: ubuntu-latest
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Download extension package
uses: actions/download-artifact@v4
with:
name: extension-artifacts
- name: Install Notebook v7 and extension
run: |
set -eux
python -m pip install "notebook>=7,<8" jupyterlab_plugin_playground*.whl
- name: Install ui-tests dependencies
working-directory: ui-tests
run: jlpm install
- name: Set up browser cache
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}-notebook-v7
- name: Install browser
working-directory: ui-tests
run: |
set -eux
jlpm playwright install chromium
- name: Execute Notebook v7 integration tests
working-directory: ui-tests
run: |
set -eux
jlpm test:notebook
- name: Upload Notebook v7 Playwright Test report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-tests-notebook-v7
path: |
ui-tests/test-results
ui-tests/playwright-report
check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1