Hide build info and fix deploy workflow
This commit is contained in:
@@ -60,25 +60,21 @@ def test_repo_upgrade_forces_fresh_install_without_skipping_dependencies():
|
||||
assert '"${WHEEL:-$REPO_DIR}"' in script
|
||||
|
||||
|
||||
def test_deploy_workflow_pins_built_wheel_to_triggering_revision():
|
||||
def test_deploy_workflow_pins_repository_to_triggering_revision():
|
||||
workflow = (Path(__file__).parents[1] / ".gitea/workflows/deploy.yml").read_text()
|
||||
|
||||
assert "actions/upload-artifact@v4" in workflow
|
||||
assert "actions/download-artifact@v4" in workflow
|
||||
assert "scp -P" in workflow
|
||||
assert "DEPLOY_SHA: ${{ github.sha }}" in workflow
|
||||
assert "git fetch --prune origin main" in workflow
|
||||
assert "git checkout --detach $DEPLOY_SHA" in workflow
|
||||
assert "repo-upgrade.sh /tmp/importarr-deploy.whl $DEPLOY_SHA" in workflow
|
||||
assert 'repo-upgrade.sh \\"\\" $DEPLOY_SHA' in workflow
|
||||
|
||||
|
||||
def test_deploy_workflow_cleans_up_without_masking_deployment_failure():
|
||||
def test_deploy_workflow_runs_repository_upgrade_over_ssh():
|
||||
workflow = (Path(__file__).parents[1] / ".gitea/workflows/deploy.yml").read_text()
|
||||
|
||||
capture = "|| deploy_status=\\$?;"
|
||||
cleanup = "rm -f /tmp/importarr-deploy.whl;"
|
||||
propagate = "exit \\$deploy_status"
|
||||
assert "deploy_status=0; sudo" in workflow
|
||||
assert workflow.index(capture) < workflow.index(cleanup) < workflow.index(propagate)
|
||||
assert 'ssh -p "$DEPLOY_PORT" -o BatchMode=yes "$DEPLOY_USER@$DEPLOY_HOST"' in workflow
|
||||
assert 'test -z \\"\\$(git status --porcelain)\\"' in workflow
|
||||
assert "sudo -n /bin/sh -c 'set -eu; cd /opt/importarr/repo" in workflow
|
||||
|
||||
|
||||
def test_repo_upgrade_uses_pinned_revision_for_build_metadata():
|
||||
|
||||
Reference in New Issue
Block a user