ci: use multiple python version in patch test (#21443)
* ci: bump pyenv action * ci: set default python version in patch test * ci: setup pyenv manually * ci: replace pyenv with setup-action * debug * use multiple python versions directly * Revert "debug" This reverts commit 692cbc0c9a407b86647ee09079fdde1510f300d7. * setup py with --python flag
This commit is contained in:
parent
4f70200bd5
commit
085eb41245
1 changed files with 11 additions and 10 deletions
21
.github/workflows/patch-mariadb-tests.yml
vendored
21
.github/workflows/patch-mariadb-tests.yml
vendored
|
|
@ -62,9 +62,11 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Setup Python
|
||||
uses: "gabrielfalcao/pyenv-action@v10"
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
versions: 3.10:latest, 3.7:latest
|
||||
python-version: |
|
||||
3.7
|
||||
3.10
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
|
|
@ -100,7 +102,6 @@ jobs:
|
|||
run: |
|
||||
bash ${GITHUB_WORKSPACE}/.github/helper/install_dependencies.sh
|
||||
pip install frappe-bench
|
||||
pyenv global $(pyenv versions | grep '3.10')
|
||||
bash ${GITHUB_WORKSPACE}/.github/helper/install.sh
|
||||
env:
|
||||
BEFORE: ${{ env.GITHUB_EVENT_PATH.before }}
|
||||
|
|
@ -120,25 +121,25 @@ jobs:
|
|||
|
||||
function update_to_version() {
|
||||
version=$1
|
||||
py=$2
|
||||
|
||||
branch_name="version-$version-hotfix"
|
||||
echo "Updating to v$version"
|
||||
git fetch --depth 1 upstream $branch_name:$branch_name
|
||||
git checkout -q -f $branch_name
|
||||
pip install -U frappe-bench
|
||||
|
||||
pgrep honcho | xargs kill
|
||||
rm -rf ~/frappe-bench/env
|
||||
bench -v setup env
|
||||
bench -v setup env --python $py
|
||||
bench start &> ~/frappe-bench/bench_start.log &
|
||||
|
||||
bench --site test_site migrate
|
||||
}
|
||||
|
||||
pyenv global $(pyenv versions | grep '3.7')
|
||||
update_to_version 12
|
||||
update_to_version 13
|
||||
update_to_version 12 python3.7
|
||||
update_to_version 13 python3.7
|
||||
|
||||
pyenv global $(pyenv versions | grep '3.10')
|
||||
update_to_version 14
|
||||
update_to_version 14 python3.10
|
||||
|
||||
echo "Updating to last commit"
|
||||
rm -rf ~/frappe-bench/env
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue