Skip to content

Commit 92a3118

Browse files
committed
fix(ci): Use python venv for mdns target tests
1 parent 0197c99 commit 92a3118

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/mdns__build-target-test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ jobs:
7676
- name: Run ${{ matrix.test.app }} application on ${{ matrix.idf_target }}
7777
working-directory: components/mdns/${{ matrix.test.path }}
7878
run: |
79+
export PYENV_ROOT="$HOME/.pyenv"
80+
export PATH="$PYENV_ROOT/bin:$PATH"
81+
eval "$(pyenv init --path)"
82+
eval "$(pyenv init -)"
83+
if ! pyenv versions --bare | grep -q '^3\.12\.6$'; then
84+
echo "Installing Python 3.12.6..."
85+
pyenv install -s 3.12.6
86+
fi
87+
if ! pyenv virtualenvs --bare | grep -q '^myenv$'; then
88+
echo "Creating pyenv virtualenv 'myenv'..."
89+
pyenv virtualenv 3.12.6 myenv
90+
fi
91+
pyenv activate myenv
92+
python --version
93+
pip install --prefer-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pytest-custom_exit_code esptool
94+
pip install --extra-index-url https://dl.espressif.com/pypi/ -r $GITHUB_WORKSPACE/ci/requirements.txt
7995
unzip ci/artifacts.zip -d ci
8096
for dir in `ls -d ci/build_*`; do
8197
rm -rf build sdkconfig.defaults

0 commit comments

Comments
 (0)