Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed May 31, 2023
1 parent 62bfd6a commit 1184754
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,29 @@ jobs:
- name: Run examples/internal-ssl tests
if: matrix.test-variation == 'internal-ssl'
# FIXME: --cov=dockerspawner is omitted as the tested code lives inside
# the built dockerspawner image, so --cov=dockerspawner
# referencing the local source code doesn't get us test coverage.
#
run: |
pytest examples/internal-ssl --capture=no --cov=dockerspawner
pytest examples/internal-ssl --capture=no
- name: Prepare for user-mode podman tests
if: matrix.test-variation == 'podman'
# Docker is stopped, and podman's system service is started in user-mode
# aka. rootless.
#
# ref: https://docs.podman.io/en/latest/markdown/podman-system-service.1.html
#
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
echo "DOCKER_HOST=$DOCKER_HOST" >> $GITHUB_ENV
podman system service --time=0 $DOCKER_HOST &
for n in $(seq 1 10); do
if ! docker version; then
sleep 2
Expand All @@ -102,5 +115,10 @@ jobs:
run: |
pytest tests/test_dockerspawner.py --cov=dockerspawner
- name: Run user-mode podman tests
if: always() && matrix.test-variation == 'podman'
run: |
pytest tests/test_dockerspawner.py --cov=dockerspawner
# GitHub action reference: https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ target_version = [
# ref: https://docs.pytest.org/en/stable/
#
[tool.pytest.ini_options]
addopts = "--verbose --color=yes --durations=10"
addopts = "--verbose --color=yes --durations=10 --maxfail=2"
asyncio_mode = "auto"
testpaths = ["tests"]
# These markers are registered to avoid warnings triggered by importing from
Expand Down

0 comments on commit 1184754

Please sign in to comment.