update
Some checks failed
Setup Docker Action / setup_docker (3.12.7) (push) Failing after 17s

This commit is contained in:
hoangvv 2025-01-14 15:10:59 +07:00
parent 202e59096b
commit 9cd59a1e20
2 changed files with 32 additions and 4 deletions

View File

@ -16,13 +16,41 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Set up pyenv
run: |
curl https://pyenv.run | bash
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
- name: Install Python with pyenv
run: |
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv install ${{ matrix.python }} -s
- name: Clean up Virtual Environment
run: ./setup/clean_up_virtualenvs.sh 0
- name: Create Virtual Environment
run: pyenv virtualenv "${{ github.ref_name }}-$(git rev-parse --short "$GITHUB_SHA")"
run: |
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv virtualenv ${{ matrix.python }} "${{ github.ref_name }}-$(git rev-parse --short "$GITHUB_SHA")"
- name: Activate Virtual Environment
run: pyenv activate "${{ github.ref_name }}-$(git rev-parse --short "$GITHUB_SHA")"
run: |
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv activate "${{ github.ref_name }}-$(git rev-parse --short "$GITHUB_SHA")"
python --version # Confirm Python version
- name: Install dotenv
run: pip install python-dotenv

View File

@ -20,7 +20,7 @@ if (( keep_count > 0 )); then
# Loop through the oldest virtual environments and delete them
for venv in $oldest_venvs; do
echo "Deleting virtual environment: $venv"
pyenv virtualenv-delete "$venv" -f
pyenv virtualenv-delete -f "$venv"
done
fi