Skip to content

121 friendlier warning if bluez is not installed on linux #297

121 friendlier warning if bluez is not installed on linux

121 friendlier warning if bluez is not installed on linux #297

Workflow file for this run

name: Build, Lint, and Test
on:
push:
branches:
- 'master'
pull_request:
branches: [ master ]
jobs:
build:
name: Build, Lint, and Test
runs-on: ${{matrix.os}}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python-version: [3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 mypy pytest
pip install -r requirements.txt
pip install -r docs/requirements.txt
- name: Install bluetooth ctl linux
if: runner.os == 'Linux'
run: |
if [ "$RUNNER_OS" == "Linux" ] ; then
# Circumvent bleak's check for bluetoothctl version
# It's not needed for non-hardware tests
pwd >> $GITHUB_PATH
printf "#include <stdio.h>\nint main(void)\n{\n\tprintf(\"bluetoothctl: 5.55\\\n\");\n\treturn 0;\n}\n" | gcc -x c -o ./bluetoothctl -
./bluetoothctl
fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --show-source --statistics --max-line-length 88
# exit-zero treats all errors as warnings.
flake8 . --count --exit-zero --statistic --max-line-length 88
- name: Check mypy
# Hold off on windows. Mypy is not being consistant there
if: runner.os != 'Windows'
run: |
mypy bless
- name: Build Sphinx docs
if: runner.os == 'Linux' && matrix.python-version == '3.11'
run: |
sphinx-build -b html docs docs/_build/html
- name: Test with pytest
run: |
python -m pytest