Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
75 changes: 65 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy
name: Build, Test, and Deploy

on:
push:
Expand All @@ -20,25 +20,80 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
- uses: prefix-dev/setup-pixi@v0.9.3
with:
micromamba-version: '2.0.5-0'
environment-file: build-environment.yml
cache-environment: true
pixi-version: v0.59.0
cache: true
- name: Build the JupyterLite site
shell: bash -l {0}
run: |
cp README.md content
jupyter lite build --contents content --output-dir dist
pixi run build

- name: Upload dist
uses: actions/upload-pages-artifact@v3
- name: Upload dist artifact for testing
uses: actions/upload-artifact@v4
with:
name: jupyterlite-dist
path: ./dist

deploy:
- name: Upload dist for GitHub Pages
uses: actions/upload-pages-artifact@v4
with:
path: ./dist

test:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.3
with:
pixi-version: v0.59.0
cache: true

- name: Download built site
uses: actions/download-artifact@v4
with:
name: jupyterlite-dist
path: ./dist

- name: Install Playwright browsers
shell: bash -l {0}
run: |
pixi run playwright install --with-deps chromium

- name: Run notebook tests
shell: bash -l {0}
run: |
pixi run test

- name: Upload screenshots on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-screenshots
path: |
ui-tests/screenshot_*.png
ui-tests/videos
if-no-files-found: ignore

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: |
ui-tests/report.html
ui-tests/test-results
if-no-files-found: ignore

deploy:
needs: test
if: github.ref == 'refs/heads/main'
permissions:
pages: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rtd-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://try-jupyter--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}/lite/lab/index.html) :point_left: Try it on ReadTheDocs`
body: `[![lite-badge](https://jupyterlite.rtfd.io/en/latest/_static/badge.svg)](https://try-jupyter--${PR_NUMBER}.org.readthedocs.build/en/${PR_NUMBER}) :point_left: Try it on ReadTheDocs`
})
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,17 @@ dmypy.json
# jupyterlite
*.doit.db
_output
# pixi environments
.pixi/*
!.pixi/config.toml

# JupyterLite terminal
cockle-config.json
.cockle_temp/
cockle_wasm_env/

# UI tests
ui-tests/*.png
ui-tests/report.html
ui-tests/.pytest_cache/
ui-tests/videos/
17 changes: 8 additions & 9 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: 2

build:
os: "ubuntu-20.04"
os: ubuntu-22.04
tools:
python: "miniconda-latest"

conda:
environment: build-environment.yml

sphinx:
configuration: conf.py
# this ensures a viable `mamba` is on `$PATH``
python: mambaforge-latest
commands:
- mamba install -c conda-forge -c nodefaults pixi
- pixi install
- pixi run build
- pixi run readthedocs
34 changes: 0 additions & 34 deletions build-environment.yml

This file was deleted.

31 changes: 0 additions & 31 deletions conf.py

This file was deleted.

Loading