mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
570 tests over the standard library's unittest, so there is nothing to install beyond the PyQt6 the application already needs. They reach neither the network, the microphone, nor the real ~/.config/dikte: urllib is faked at one function, the tools are faked at shutil.which, and every test is handed its own config and data directory. What they hold onto is what a change is most likely to move without meaning to. The request each provider is sent, field by field. A settings window that loads a value into a widget and writes it back, which is where a setting added to one half and not the other is silently reset. The dictation chain end to end: what is transcribed, what is pasted, what lands in the history, and what happens to the audio afterwards. A config file written by an older version. A meeting whose two channels heard the same sentence. 59 of them carry @linux_only, because they cover what Dikte is on this desktop rather than what it does: PipeWire, wl-clipboard, ydotool, KDE's shortcut file. The other 511 pass on any platform, and that line is worth holding as the ports arrive. CONTRIBUTING.md says how to run them, what support.py offers, and the three things about this codebase that trip up a new test.
41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python: ["3.11", "3.12", "3.13"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
|
|
# PyQt6 ships Qt itself, but Qt still loads these from the system, even
|
|
# for the offscreen platform the tests run on. QtNetwork wants the Kerberos
|
|
# library, and the widgets want fontconfig, whether or not anything is
|
|
# ever drawn.
|
|
- name: Install the Qt runtime libraries
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --no-install-recommends -y \
|
|
libegl1 libgl1 libxkbcommon0 libdbus-1-3 libglib2.0-0 \
|
|
libfontconfig1 libfreetype6 libgssapi-krb5-2
|
|
|
|
- name: Install PyQt6
|
|
run: python -m pip install --quiet PyQt6
|
|
|
|
# Nothing else is needed: the code is standard library and PyQt6, and the
|
|
# tests reach neither the network nor a sound device.
|
|
- name: Run the tests
|
|
run: python -m unittest discover --verbose
|