Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Update build workflow from the template
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio committed Oct 17, 2023
1 parent 97cc69f commit 8b0c815
Showing 1 changed file with 67 additions and 41 deletions.
108 changes: 67 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,70 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.1-0'
environment-file: environment.yml
cache-environment: true

- name: Build the extension
run: python -m build

- uses: actions/upload-artifact@v2
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
path: ./dist
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.1-0'
environment-file: environment.yml
cache-environment: true

- name: Build the extension
run: |
set -eux
python -m pip install .[test]
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
python -m jupyterlab.browser_check
- name: Package the extension
run: |
set -eux
pip install build
python -m build
pip uninstall -y "jupyterlite-xeus-python" jupyterlab
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
path: dist/jupyterlite-xeus-python*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v2
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
path: ./dist
- 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 jupyterlite_xeus_python*.tar.gz
pip install "jupyterlab==4"
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
# TODO: add JupyterLite browser check
# python -m jupyterlab.browser_check --no-chrome-test
working-directory: dist
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- uses: actions/download-artifact@v3
with:
name: jupyterlite-xeus-python-dist-${{ github.run_number }}
- 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.0.0,<5" jupyterlite_xeus_python*.whl
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@jupyterlite/xeus-python-kernel.*OK"
# TODO: add JupyterLite browser check
python -m jupyterlab.browser_check --no-browser-test
python-tests-mamba-python:
needs: build
Expand Down Expand Up @@ -198,3 +214,13 @@ jobs:
- name: Run tests
run: pytest -rP test_xeus_python_env.py
working-directory: tests


check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1

0 comments on commit 8b0c815

Please sign in to comment.