Skip to content

Update watchdog requirement from ~=2.1 to >=2.1,<7.0 in /pkg_lifeblood #389

Update watchdog requirement from ~=2.1 to >=2.1,<7.0 in /pkg_lifeblood

Update watchdog requirement from ~=2.1 to >=2.1,<7.0 in /pkg_lifeblood #389

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: "Tests"
on:
push:
branches: [ dev, master ]
paths:
- '**.py'
- 'pkg_lifeblood/pyproject.toml'
- 'pkg_lifeblood/setup.cfg'
- 'pkg_lifeblood_viewer/pyproject.toml'
- 'pkg_lifeblood_viewer/setup.cfg'
- '.github/workflows/tests.yml'
pull_request:
branches: [ dev, master ]
paths:
- '**.py'
- 'pkg_lifeblood/pyproject.toml'
- 'pkg_lifeblood/setup.cfg'
- 'pkg_lifeblood_viewer/pyproject.toml'
- 'pkg_lifeblood_viewer/setup.cfg'
- '.github/workflows/tests.yml'
jobs:
tests:
name: "Tests Linux"
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ['3.8', '3.9', '3.10']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.pyver}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pyver}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-timeout
cd pkg_lifeblood
pip install .
cd ..
- name: Adjust PYTHONPATH
run: echo "PYTHONPATH=$PYTHOPATH:./src" >> $GITHUB_ENV
- name: what net is this
run: ip addr show
- name: Test with pytest
run: pytest --timeout=180 --durations=10 --junitxml=tests_log_linux_${{matrix.pyver}}.xml
- name: save result
uses: actions/upload-artifact@v4
with:
name: tests-report_lin_${{matrix.pyver}}
path: tests_log_linux_${{matrix.pyver}}.xml
if: ${{ always() }}
timeout-minutes: 20
tests_windows:
name: "Tests Windows"
runs-on: windows-latest
strategy:
matrix:
pyver: [ '3.9', '3.10' ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.pyver}}
uses: actions/setup-python@v5
with:
python-version: ${{matrix.pyver}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-timeout
cd pkg_lifeblood
pip install .
cd ..
shell: bash
- name: Adjust PYTHONPATH
run: echo PYTHONPATH=%PYTHOPATH%;%cd%\src >> %GITHUB_ENV%
shell: cmd
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest --timeout=180 --durations=10 --junitxml=tests_log_win_${{matrix.pyver}}.xml
shell: bash
- name: save result
uses: actions/upload-artifact@v4
with:
name: tests-report_win_${{matrix.pyver}}
path: tests_log_win_${{matrix.pyver}}.xml
if: ${{ always() }}
timeout-minutes: 30