Skip to content

Commit

Permalink
Use uv instead of python venv
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolaik committed Mar 3, 2025
1 parent 0d28d31 commit 71fbc97
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ runs:
using: composite
steps:
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3.7.0
- uses: astral-sh/setup-uv@f94ec6bedd8674c4426838e6b50417d36b6ab231 # v5.3.1
- run: |
cd $GITHUB_ACTION_PATH \
&& ./ct.sh \
Expand Down
14 changes: 6 additions & 8 deletions ct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ install_chart_testing() {
CT_SIG=https://github.com/helm/chart-testing/releases/download/v$version/chart-testing_${version#v}_linux_$arch.tar.gz.sig

curl --retry 5 --retry-delay 1 -sSLo ct.tar.gz "https://github.com/helm/chart-testing/releases/download/v$version/chart-testing_${version#v}_linux_$arch.tar.gz"
cosign verify-blob --certificate $CT_CERT --signature $CT_SIG \
cosign verify-blob --certificate "$CT_CERT" --signature "$CT_SIG" \
--certificate-identity "https://github.com/helm/chart-testing/.github/workflows/release.yaml@refs/heads/main" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" ct.tar.gz
retVal=$?
Expand All @@ -109,17 +109,15 @@ install_chart_testing() {
rm -f ct.tar.gz

echo 'Creating virtual Python environment...'
python3 -m venv "${venv_dir}"

echo 'Activating virtual environment...'
# shellcheck disable=SC1090
source "${venv_dir}/bin/activate"
export UV_LINK_MODE=copy
uv venv "${venv_dir}"
export VIRTUAL_ENV="${venv_dir}"

echo 'Installing yamllint...'
pip3 install "yamllint==${yamllint_version}"
uv pip install "yamllint==${yamllint_version}"

echo 'Installing Yamale...'
pip3 install "yamale==${yamale_version}"
uv pip install "yamale==${yamale_version}"
fi

# https://github.com/helm/chart-testing-action/issues/62
Expand Down

0 comments on commit 71fbc97

Please sign in to comment.