feat: add extended mouse forwarding #350
This file contains hidden or 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: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - staging | |
| - main | |
| pull_request: | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install build and quality tooling | |
| run: | | |
| retry() { | |
| local attempts="$1" | |
| shift | |
| local n=1 | |
| until "$@"; do | |
| if [ "$n" -ge "$attempts" ]; then | |
| return 1 | |
| fi | |
| n=$((n + 1)) | |
| sleep 5 | |
| done | |
| } | |
| retry 3 python -m pip install --upgrade pip setuptools wheel | |
| retry 3 python -m pip install -e . black ruff yamllint shfmt-py shellcheck-py build | |
| - name: Python formatting checks | |
| run: | | |
| black --check src tests | |
| - name: Python lint checks | |
| run: | | |
| ruff check src tests | |
| - name: Python compile checks | |
| run: | | |
| python -m compileall src tests | |
| - name: Python unit tests | |
| run: | | |
| python -m unittest discover -s tests -v | |
| - name: CLI checks | |
| run: | | |
| python -m bluetooth_2_usb --help | |
| python -m bluetooth_2_usb --version | |
| python -m bluetooth_2_usb --validate-env || test $? -eq 3 | |
| - name: Shell formatting checks | |
| run: | | |
| mapfile -d '' shell_scripts < <(find scripts -type f -name '*.sh' -print0 | sort -z) | |
| [[ ${#shell_scripts[@]} -gt 0 ]] || { echo "expected shell scripts under scripts/, found none"; exit 1; } | |
| shfmt -d -i 2 -ci -bn "${shell_scripts[@]}" | |
| - name: Shell lint checks | |
| run: | | |
| mapfile -d '' shell_scripts < <(find scripts -type f -name '*.sh' -print0 | sort -z) | |
| [[ ${#shell_scripts[@]} -gt 0 ]] || { echo "expected shell scripts under scripts/, found none"; exit 1; } | |
| shellcheck -x "${shell_scripts[@]}" | |
| - name: Shell syntax checks | |
| run: | | |
| mapfile -d '' shell_scripts < <(find scripts -type f -name '*.sh' -print0 | sort -z) | |
| [[ ${#shell_scripts[@]} -gt 0 ]] || { echo "expected shell scripts under scripts/, found none"; exit 1; } | |
| bash -n "${shell_scripts[@]}" | |
| - name: YAML lint checks | |
| run: | | |
| yamllint .github/workflows/ci.yml | |
| - name: Build checks | |
| run: | | |
| python -m build |