Skip to content

Move DesktopNotifier.app_icon to DesktopNotifierBackend.app_icon #231

Move DesktopNotifier.app_icon to DesktopNotifierBackend.app_icon

Move DesktopNotifier.app_icon to DesktopNotifierBackend.app_icon #231

Workflow file for this run

name: test
on:
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ macos-12, macos-latest, ubuntu-20.04, ubuntu-latest, windows-2019, windows-latest ]
python-version: ["3.9", "3.12"]
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"
- os: "ubuntu-20.04"
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@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5.3.0
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 }}