From 8c1266ab0dcb1da0e47c01e5bfc771d323d28fd0 Mon Sep 17 00:00:00 2001 From: pax Date: Fri, 10 Apr 2026 00:01:28 -0500 Subject: [PATCH] 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). --- .github/workflows/tests.yml | 18 ++++++++++++++++++ README.md | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..f6f5bf3 --- /dev/null +++ b/.github/workflows/tests.yml @@ -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 diff --git a/README.md b/README.md index eb23687..d353941 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # 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. Qt6 desktop app for Linux and Windows. Browse, search, and archive Danbooru, e621, Gelbooru, and Moebooru. Fully themeable.