mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Wait for PyPI propagation before release smoke
This commit is contained in:
parent
01d2da25b6
commit
abbf747103
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@ -138,12 +138,20 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
sleep 60
|
||||
VERSION='${{ steps.version.outputs.version }}'
|
||||
TOOL_ROOT="$(mktemp -d)"
|
||||
export UV_TOOL_DIR="$TOOL_ROOT/tools"
|
||||
export UV_TOOL_BIN_DIR="$TOOL_ROOT/bin"
|
||||
"$UV_BINARY" tool install --no-cache --prerelease allow --force "archivebox==$VERSION"
|
||||
for attempt in {1..40}; do
|
||||
if "$UV_BINARY" tool install --no-cache --prerelease allow --force "archivebox==$VERSION"; then
|
||||
break
|
||||
fi
|
||||
if [[ "$attempt" == 40 ]]; then
|
||||
echo "archivebox==$VERSION did not become installable from PyPI within 10 minutes" >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 15
|
||||
done
|
||||
INSTALLED_VERSION="$("$UV_TOOL_BIN_DIR/archivebox" --version)"
|
||||
test "$INSTALLED_VERSION" = "$VERSION"
|
||||
|
||||
|
||||
@ -22,6 +22,15 @@ def test_release_uses_registered_publisher_and_authorized_tag_credentials():
|
||||
assert checkout["with"]["token"] == "${{ secrets.RELEASE_GH_TOKEN || github.token }}"
|
||||
assert docker_release["needs"] == "python-release"
|
||||
|
||||
published_install = next(
|
||||
step for step in python_release["steps"] if step.get("name") == "Verify published PyPI package installs and runs"
|
||||
)
|
||||
install_script = published_install["run"]
|
||||
assert "sleep 60" not in install_script
|
||||
assert "for attempt in {1..40}" in install_script
|
||||
assert 'tool install --no-cache --prerelease allow --force "archivebox==$VERSION"' in install_script
|
||||
assert "did not become installable from PyPI within 10 minutes" in install_script
|
||||
|
||||
docker_meta = next(step for step in docker_release["steps"] if step.get("id") == "docker_meta")
|
||||
tag_script = docker_meta["run"]
|
||||
assert 'echo "${DOCKERHUB_IMAGE}:dev"' in tag_script
|
||||
|
||||
Loading…
Reference in New Issue
Block a user