From dff507702b7769553a5fa0ddfa5fc31d0cfb9b4e Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Wed, 23 Oct 2024 19:28:34 -0700 Subject: [PATCH] fix: usage of `a deprecated Node.js version` in CI (#8506) ## Summary [`ci.yml`](https://github.com/astral-sh/uv/blob/main/.github/workflows/ci.yml) uses [`gabrielfalcao/pyenv-action@v18`](https://github.com/gabrielfalcao/pyenv-action/), which [uses `a deprecated Node.js version`](https://github.com/astral-sh/uv/actions/runs/11483963555). This pull request aims to remove any usage of `a deprecated Node.js version` from [`ci.yml`](https://github.com/astral-sh/uv/blob/main/.github/workflows/ci.yml). ## Test Plan I attempted to test this but [canceled the run on my fork](https://github.com/hamirmahal/uv/actions/runs/11484989508/job/31964058415) after it waited for a runner for over 10 minutes with no result. --------- Co-authored-by: Charlie Marsh --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f50a18d5f..87ef9bac5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1606,9 +1606,23 @@ jobs: - uses: actions/checkout@v4 - name: "Install pyenv" - uses: "gabrielfalcao/pyenv-action@v18" - with: - default: 3.9.7 + run: | + # Install pyenv + curl https://pyenv.run | bash + + # Set up environment variables for current step + export PYENV_ROOT="$HOME/.pyenv" + export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" + + # Install Python 3.9 + pyenv install 3.9 + pyenv global 3.9 + + # Make environment variables persist across steps + echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV + echo "$HOME/.pyenv/bin" >> $GITHUB_PATH + echo "$HOME/.pyenv/shims" >> $GITHUB_PATH - name: "Download binary" uses: actions/download-artifact@v4