DesktopNotifierBackend: Drop notification param from handle_*() methods
#296
Workflow file for this run
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: test | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-13, macos-latest, ubuntu-latest, windows-2022, windows-latest ] | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| include: | |
| - pre-command: "" | |
| pytest-run-prefix: "" | |
| - os: "ubuntu-latest" | |
| pre-command: | | |
| sudo apt update -y | |
| sudo apt install -y --no-install-recommends \ | |
| blackbox \ | |
| dbus-x11 \ | |
| dbus-user-session \ | |
| notification-daemon | |
| mkdir -p /usr/share/dbus-1/services | |
| echo ' | |
| [D-BUS Service] | |
| Name=org.freedesktop.Notifications | |
| Exec=/usr/lib/notification-daemon/notification-daemon | |
| ' > /usr/share/dbus-1/services/org.freedesktop.Notifications.service | |
| # Start Virtual X server | |
| echo "Start X server..." | |
| Xvfb :99 -screen 0 2048x1536x24 & | |
| sleep 1 | |
| DISPLAY=:99 dbus-launch | |
| DISPLAY=:99 systemctl --user daemon-reload | |
| # Start Window manager | |
| echo "Start window manager..." | |
| DISPLAY=:99 blackbox & | |
| sleep 1 | |
| pytest-run-prefix: "DISPLAY=:99" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: set up python ${{ matrix.python-version }} | |
| uses: actions/[email protected] | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install dependencies | |
| run: | | |
| ${{ matrix.pre-command }} | |
| python -m pip install --upgrade pip | |
| python -m pip install -U .[dev] | |
| - name: test | |
| run: | | |
| ${{ matrix.pytest-run-prefix }} pytest --verbose --cov=desktop_notifier --cov-report=xml | |
| - name: upload code coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage.xml | |
| flags: pytest | |
| env_vars: OS,PYTHON | |
| name: pytests | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| env: | |
| OS: ${{ matrix.platform }} | |
| PYTHON: ${{ matrix.python-version }} |