Нова сумісність: ESP32-S3, ESP32-C3 #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Server PyTests' | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- develop | |
paths: | |
- "deploy/**" | |
push: | |
branches: | |
- develop | |
paths: | |
- "deploy/**" | |
workflow_call: | |
jobs: | |
pytests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12.8' | |
- name: Install dependencies from deploy subfolders | |
run: | | |
cd deploy | |
for req_file in $(find . -name "requirements.txt"); do | |
echo "Installing dependencies from $req_file" | |
pip install -r "$req_file" | |
done | |
- name: Ensure pytest is installed | |
run: pip install pytest | |
- name: Add deploy to PYTHONPATH | |
run: | | |
DEPLOY_PATH=$(pwd)/deploy | |
if [ -z "$PYTHONPATH" ]; then | |
echo "PYTHONPATH=$DEPLOY_PATH" >> $GITHUB_ENV | |
else | |
echo "PYTHONPATH=${PYTHONPATH}:$DEPLOY_PATH" >> $GITHUB_ENV | |
fi | |
- name: Debug PYTHONPATH | |
run: | | |
echo "Current PYTHONPATH: $PYTHONPATH" | |
- name: Run PyTest in deploy/tests | |
run: | | |
cd deploy/tests | |
pytest --tb=short -v --capture=tee-sys |