diff --git a/.gitea/scripts/start-radicale.sh b/.gitea/scripts/start-radicale.sh index e3d4774..585e860 100755 --- a/.gitea/scripts/start-radicale.sh +++ b/.gitea/scripts/start-radicale.sh @@ -23,7 +23,8 @@ htpasswd_encryption = plain [storage] filesystem_folder = $work/data CONF -"$python" -m radicale --config "$work/config" > "$work/radicale.log" 2>&1 & +# nohup: the server has to outlive this step's shell - the suite runs in the next step. +nohup "$python" -m radicale --config "$work/config" > "$work/radicale.log" 2>&1 & # The readiness probe uses the same Python, not curl: ci.yml's job image has no curl. ready=' import base64, sys, urllib.request diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 96f5f13..8ce9d34 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -132,6 +132,14 @@ jobs: .venv/bin/python -m pytest -q \ --cov --cov-report=term --cov-report=xml --cov-report=html + - name: Start Radicale + # Its own step because the script hands the server's address to the suite through + # $GITHUB_ENV, which only reaches the steps after the one that wrote it. + run: | + set -eu + tools/.venv/bin/pip install --quiet radicale + .gitea/scripts/start-radicale.sh tools/.venv/bin/python /tmp/radicale + - name: Live tracker suite (CalDAV) # The one live tracker that needs no app and no display: a throwaway Radicale on # loopback. `CHEMENU_LIVE_REQUIRE=caldav` turns "no server" into a failure - without @@ -142,8 +150,6 @@ jobs: CHEMENU_LIVE_REQUIRE: caldav run: | set -eu - tools/.venv/bin/pip install --quiet radicale - .gitea/scripts/start-radicale.sh tools/.venv/bin/python /tmp/radicale cd tools .venv/bin/python -m pytest -q -m live_tracker -k caldav -s