Sfoglia il codice sorgente

ci(patch): Switch Python env for each version

version-14
Gavin D'souza 2 anni fa
committed by gavin
parent
commit
ab54e72cbc
1 ha cambiato i file con 14 aggiunte e 5 eliminazioni
  1. +14
    -5
      .github/workflows/patch-mariadb-tests.yml

+ 14
- 5
.github/workflows/patch-mariadb-tests.yml Vedi File

@@ -31,9 +31,10 @@ jobs:
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
uses: "gabrielfalcao/pyenv-action@v9"
with:
python-version: '3.10'
versions: 3.10:latest, 3.7:latest, 2.7:latest
command: pyenv local 3.10

- name: Setup Node
uses: actions/setup-node@v3
@@ -120,15 +121,23 @@ jobs:
for version in $(seq 12 13)
do
echo "Updating to v$version"
if [ $version == 12 ]; then
pyenv local 2.7
elif [ $version == 13 ]; then
pyenv local 3.7
fi
branch_name="version-$version-hotfix"
git fetch --depth 1 upstream $branch_name:$branch_name

git checkout -q -f $branch_name
bench setup requirements --python

rm -rf ~/frappe-bench/env
bench setup env
bench --site test_site migrate
done

echo "Updating to last commit"
git checkout -q -f "$GITHUB_SHA"
bench setup requirements --python
pyenv local 3.10
rm -rf ~/frappe-bench/env
bench setup env
bench --site test_site migrate

Caricamento…
Annulla
Salva