Skip to content

Merge branch 'main' into payload-fix #43

Merge branch 'main' into payload-fix

Merge branch 'main' into payload-fix #43

name: Test Integration
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
test_type:
- "with_server_options"
- "not with_server_options"
os:
- ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Setup Python
uses: mamba-org/[email protected]
with:
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
-c conda-forge
- name: Install JHub Apps
run: |
pip install .
- name: Install chp
run: npm install -g configurable-http-proxy
- name: Add server options if with server types
if: matrix.test_type == 'with_server_options'
run: |
cat >> jupyterhub_config.py <<- EOM
c.KubeSpawner.profile_list = [
{
"description": "Stable environment with 0.5-1 cpu / 0.5-1 GB ram",
"display_name": "Micro Instance",
"slug": "micro-instance"
},
{
"description": "Stable environment with 1 cpu / 1 GB ram",
"display_name": "Small Instance",
"slug": "small-instance"
},
]
EOM
cat jupyterhub_config.py
- name: Start JupyterHub on Ubuntu
run: |
nohup jupyterhub -f jupyterhub_config.py > jupyterhub-logs.txt 2>&1 &
# Give it some to time to start properly
sleep 10
cat jupyterhub-logs.txt
curl http://127.0.0.1:8000/services/japps/
cat jupyterhub-logs.txt
- name: Install Playwright
run: |
pip install pytest-playwright
- name: Install Playwright Browser
run: |
playwright install
- name: Run Tests
run: |
pytest jhub_apps/tests_e2e/ -vvv -m "${{ matrix.test_type }}"
- name: Upload Playwright Videos
if: always()
uses: actions/[email protected]
with:
name: ${{ matrix.os }}-${{ matrix.test_type }}-playwright-videos
path: videos
- name: Upload JupyterHub logs
if: always()
uses: actions/[email protected]
with:
name: ${{ matrix.os }}-${{ matrix.test_type }}-jupyterhub-logs
path: jupyterhub-logs.txt
- name: JupyterHub logs
if: always()
run: cat jupyterhub-logs.txt