ci: add GitHub Actions test workflow + README badge

Runs pytest tests/ on every push and PR. Ubuntu runner with
Python 3.11, libmpv, and QT_QPA_PLATFORM=offscreen for headless
Qt. Badge in README links to the Actions tab.

117 tests, ~0.2s locally. CI time depends on PySide6 install
(~2 min) + apt deps (~30s) + tests (~1s).
This commit is contained in:
pax 2026-04-10 00:01:28 -05:00
parent a90d71da47
commit 8c1266ab0d
2 changed files with 20 additions and 0 deletions

18
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y libmpv-dev libegl1 libxkbcommon0
- name: Install Python deps
run: pip install -e . pytest
- name: Run tests
run: QT_QPA_PLATFORM=offscreen pytest tests/ -v

View File

@ -1,5 +1,7 @@
# booru-viewer # booru-viewer
[![tests](https://github.com/pxlwh/booru-viewer/actions/workflows/tests.yml/badge.svg)](https://github.com/pxlwh/booru-viewer/actions/workflows/tests.yml)
A booru client for people who keep what they save and rice what they run. A booru client for people who keep what they save and rice what they run.
Qt6 desktop app for Linux and Windows. Browse, search, and archive Danbooru, e621, Gelbooru, and Moebooru. Fully themeable. Qt6 desktop app for Linux and Windows. Browse, search, and archive Danbooru, e621, Gelbooru, and Moebooru. Fully themeable.