File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ jobs:
147147 **/pylock.ci-old.toml
148148 python-version : ${{ matrix.python }}
149149 if : matrix.kind == 'old'
150- - run : bash ./tools/github_actions_verify_python.sh
150+ - run : bash ./tools/github_actions_verify_python.sh "${{ matrix.python }}"
151151 - run : bash ./tools/github_actions_dependencies.sh
152152 - run : python ./tools/github_actions_check_old_env.py
153153 if : matrix.kind == 'old'
Original file line number Diff line number Diff line change 22
33set -eo pipefail
44
5+ WANT_PYTHON_VERSION=" $1 "
6+ if [[ -z " $WANT_PYTHON_VERSION " ]]; then
7+ echo " ✕ ERROR: Missing required argument: want Python version (e.g., 3.10)"
8+ exit 1
9+ fi
10+
511GOT_PYTHON=$( which python)
12+ GOT_PYTHON_VERSION=$( python --version)
613echo " Checking Python found at:"
7- echo " \$ (which python) == ${GOT_PYTHON} "
14+ echo " \$ (which python) == ${GOT_PYTHON} "
15+ echo " \$ (python --version) == ${GOT_PYTHON_VERSION} "
816echo " for"
9- echo " \$ MNE_CI_KIND == ${MNE_CI_KIND} "
17+ echo " \$ MNE_CI_KIND == ${MNE_CI_KIND} "
1018if [[ " ${MNE_CI_KIND} " == " conda" ]] || [[ " ${MNE_CI_KIND} " == " mamba" ]]; then
1119 WANT=" micromamba/envs/mne"
1220elif [[ " ${MNE_CI_KIND} " == " old" ]]; then
@@ -24,3 +32,9 @@ if [[ "${GOT_PYTHON}" != *"${WANT}"* ]]; then
2432else
2533 echo " ☑ Found expected \" ${WANT} \" "
2634fi
35+ if [[ " ${GOT_PYTHON_VERSION} " != * " ${WANT_PYTHON_VERSION} " * ]]; then
36+ echo " ✕ ERROR: Did not find expected Python version \" ${WANT_PYTHON_VERSION} \" "
37+ exit 1
38+ else
39+ echo " ☑ Found expected Python version \" ${WANT_PYTHON_VERSION} \" "
40+ fi
You can’t perform that action at this time.
0 commit comments