ci: pin uv, the tool that builds the pytest venv
The panel backend has 25 pytest tests that no workflow has ever run. Making them run needs a throwaway virtualenv, and uv is what builds it in seconds against the pinned requirements-dev.txt. Installing it through install-ci-tools.sh rather than assuming it is on the runner keeps the version in one place, where the other three tools already live, and where the Renovate regex manager can move it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0ae0df7473
commit
284e19ef88
4 files changed
+33
No files matched your search
@@ -93,6 +93,20 @@ install_shellcheck() {
|
|||||||
rm -rf "$tmp"
|
rm -rf "$tmp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_uv() {
|
||||||
|
if at_version uv "${UV_VERSION}"; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
local tmp
|
||||||
|
tmp="$(mktemp -d)"
|
||||||
|
# uv release tags carry no leading v, unlike every other tool installed here.
|
||||||
|
fetch "https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-${sharch}-unknown-linux-gnu.tar.gz" \
|
||||||
|
"$tmp/uv.tar.gz"
|
||||||
|
tar -xzf "$tmp/uv.tar.gz" -C "$tmp" --strip-components=1 "uv-${sharch}-unknown-linux-gnu/uv"
|
||||||
|
install -m 0755 "$tmp/uv" "$BIN_DIR/uv"
|
||||||
|
rm -rf "$tmp"
|
||||||
|
}
|
||||||
|
|
||||||
install_actionlint() {
|
install_actionlint() {
|
||||||
if at_version actionlint "${ACTIONLINT_VERSION}"; then
|
if at_version actionlint "${ACTIONLINT_VERSION}"; then
|
||||||
return 0
|
return 0
|
||||||
@@ -116,6 +130,7 @@ for tool in "${wanted[@]}"; do
|
|||||||
kubeconform) install_kubeconform ;;
|
kubeconform) install_kubeconform ;;
|
||||||
shellcheck) install_shellcheck ;;
|
shellcheck) install_shellcheck ;;
|
||||||
actionlint) install_actionlint ;;
|
actionlint) install_actionlint ;;
|
||||||
|
uv) install_uv ;;
|
||||||
*)
|
*)
|
||||||
echo "install-ci-tools: unknown tool: $tool" >&2
|
echo "install-ci-tools: unknown tool: $tool" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -7,3 +7,5 @@
|
|||||||
ACTIONLINT_VERSION="1.7.7"
|
ACTIONLINT_VERSION="1.7.7"
|
||||||
SHELLCHECK_VERSION="0.11.0"
|
SHELLCHECK_VERSION="0.11.0"
|
||||||
KUBECONFORM_VERSION="0.8.0"
|
KUBECONFORM_VERSION="0.8.0"
|
||||||
|
# uv builds the throwaway venv the pytest job runs in.
|
||||||
|
UV_VERSION="0.12.17"
|
||||||
@@ -93,6 +93,14 @@ data:
|
|||||||
"datasourceTemplate": "github-tags",
|
"datasourceTemplate": "github-tags",
|
||||||
"depNameTemplate": "yannh/kubeconform"
|
"depNameTemplate": "yannh/kubeconform"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"description": "uv version used to build the pytest venv",
|
||||||
|
"managerFilePatterns": ["^\\.gitea/workflows/tool-versions\\.env$"],
|
||||||
|
"matchStrings": ["(?:^|\\n)UV_VERSION=\"(?<currentValue>[0-9.]+)\""],
|
||||||
|
"datasourceTemplate": "github-tags",
|
||||||
|
"depNameTemplate": "astral-sh/uv"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "stakater/reloader chart version pinned in the deploy workflow",
|
"description": "stakater/reloader chart version pinned in the deploy workflow",
|
||||||
|
|||||||
@@ -82,6 +82,14 @@
|
|||||||
"datasourceTemplate": "github-tags",
|
"datasourceTemplate": "github-tags",
|
||||||
"depNameTemplate": "yannh/kubeconform"
|
"depNameTemplate": "yannh/kubeconform"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"customType": "regex",
|
||||||
|
"description": "uv version used to build the pytest venv",
|
||||||
|
"managerFilePatterns": ["^\\.gitea/workflows/tool-versions\\.env$"],
|
||||||
|
"matchStrings": ["(?:^|\\n)UV_VERSION=\"(?<currentValue>[0-9.]+)\""],
|
||||||
|
"datasourceTemplate": "github-tags",
|
||||||
|
"depNameTemplate": "astral-sh/uv"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"customType": "regex",
|
"customType": "regex",
|
||||||
"description": "stakater/reloader chart version pinned in the deploy workflow",
|
"description": "stakater/reloader chart version pinned in the deploy workflow",
|
||||||
|
|||||||
Reference in new issue
Block a user