Skip to content

Refresh test workflow and associated config, accept podmain test failure for now #200

Refresh test workflow and associated config, accept podmain test failure for now

Refresh test workflow and associated config, accept podmain test failure for now #200

Workflow file for this run

# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Tests
on:
pull_request:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- ".github/workflows/*.yaml"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.7"
pip-install-spec: "jupyterhub==1.0.0 sqlalchemy==1.*"
- python-version: "3.8"
pip-install-spec: "jupyterhub==2.* sqlalchemy==1.*"
- python-version: "3.9"
pip-install-spec: "jupyterhub==3.*"
- python-version: "3.10"
pip-install-spec: "jupyterhub==4.*"
- python-version: "3.11"
pip-install-spec: "jupyterhub==4.*"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v1
with:
node-version: "18"
- name: setup docker swarm
run: docker swarm init
- name: Install Python dependencies
run: |
pip install ${{ matrix.pip-install-spec }}
pip install -e "." -r dev-requirements.txt
- name: List Python dependencies
run: |
pip freeze
- name: Install Node dependencies
run: |
npm install -g configurable-http-proxy
- name: Run tests
if: matrix.test != 'internal-ssl' && matrix.test != 'podman'
run: |
pytest tests --cov=dockerspawner
- name: Run examples/internal-ssl tests
if: matrix.test == 'internal-ssl'
run: |
cd examples/internal-ssl
pytest -vsx
- name: Prepare for user-mode podman tests
if: matrix.test == 'podman'
run: |
sudo systemctl stop docker
# Default is unix://$XDG_RUNTIME_DIR/podman/podman.sock but XDG_RUNTIME_DIR may not be set
export DOCKER_HOST=unix://$HOME/podman.sock
podman system service --time=0 $DOCKER_HOST &
for n in $(seq 1 10); do
if ! docker version; then
sleep 2
else
break
fi
done
docker ps
- name: Run user-mode podman tests
if: matrix.test == 'podman'
run: |
pytest tests/test_dockerspawner.py --cov=dockerspawner
# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v3