[PR #15] [CLOSED] Add fast backend test harness, coverage, and CI workflow #15

Closed
opened 2026-04-20 20:05:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/KohakuBlueleaf/KohakuHub/pull/15
Author: @narugo1992
Created: 4/19/2026
Status: Closed

Base: mainHead: test/unit


📝 Commits (10+)

  • 4c6dba6 Add local development bootstrap and deterministic demo fixtures
  • b5a6ab5 Add new-tab support to repo card titles
  • 77786df Add new-tab support to commit links and breadcrumbs
  • e53f48b Merge pull request #2 from deepghs/dev/click
  • 98c0e02 Add session-scoped repo sort preferences and timezone-aware timestamps
  • 7b29dbf Merge pull request #3 from deepghs/dev/order
  • 42b7f3f Raise LFS keep versions UI limit to 9999
  • 82ea9d9 Merge pull request #4 from deepghs/chore/lfs-keep-versions-max-9999
  • 8667cc3 Widen branch selector in repo viewer
  • fef57a1 Tighten repo branch selector width

📊 Changes

100 files changed (+7529 additions, -386 deletions)

View changed files

.coveragerc (+21 -0)
.env.dev.example (+51 -0)
.github/workflows/backend-fast-tests.yml (+68 -0)
📝 .gitignore (+6 -0)
Makefile (+105 -0)
📝 config-example.toml (+2 -1)
docs/development/local-dev.md (+291 -0)
📝 pyproject.toml (+2 -1)
📝 pytest.ini (+10 -2)
scripts/dev/down_infra.sh (+26 -0)
scripts/dev/init_lakefs.py (+152 -0)
scripts/dev/reset_local_data.sh (+51 -0)
scripts/dev/run_backend.sh (+76 -0)
scripts/dev/seed_demo_data.py (+1988 -0)
scripts/dev/up_infra.sh (+184 -0)
📝 scripts/generate_docker_compose.py (+4 -1)
📝 scripts/migrate_config.py (+4 -1)
📝 scripts/sync_lakefs_credentials.py (+4 -1)
scripts/tests/backend_fast_state.py (+102 -0)
📝 src/kohaku-hub-ui/src/components/pages/RepoListPage.vue (+43 -38)

...and 80 more files

📄 Description

Summary

  • add a mirrored test/kohakuhub fast backend suite with package-style __init__.py coverage across auth, repo, commit, org, quota, invitation, admin, misc, and git SSH key routes
  • add a deterministic SQLite + fake S3/LakeFS state harness that prepares a reusable baseline and restores data before every test
  • wire cross-platform test entrypoints into scripts/tests/backend_fast_state.py, Makefile, local docs, coverage config, and a GitHub Actions workflow
  • fix backend issues surfaced by the new suite in admin user creation, legacy quota endpoints, and fast LakeFS test doubles

Verification

  • make test-backend-fast
  • make test-backend-cov

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/KohakuBlueleaf/KohakuHub/pull/15 **Author:** [@narugo1992](https://github.com/narugo1992) **Created:** 4/19/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `test/unit` --- ### 📝 Commits (10+) - [`4c6dba6`](https://github.com/KohakuBlueleaf/KohakuHub/commit/4c6dba64584e1a2ed3e4fda4515d6f32519e6ea9) Add local development bootstrap and deterministic demo fixtures - [`b5a6ab5`](https://github.com/KohakuBlueleaf/KohakuHub/commit/b5a6ab5134b6f7dd9dae0213255d0b0e6d045e8e) Add new-tab support to repo card titles - [`77786df`](https://github.com/KohakuBlueleaf/KohakuHub/commit/77786df1d940038000de1932baa18a02644dd044) Add new-tab support to commit links and breadcrumbs - [`e53f48b`](https://github.com/KohakuBlueleaf/KohakuHub/commit/e53f48b3f4d6a23e0997ed9ac7107416e1736036) Merge pull request #2 from deepghs/dev/click - [`98c0e02`](https://github.com/KohakuBlueleaf/KohakuHub/commit/98c0e020e914e6cb17615013286139175af8f0ba) Add session-scoped repo sort preferences and timezone-aware timestamps - [`7b29dbf`](https://github.com/KohakuBlueleaf/KohakuHub/commit/7b29dbf677f68e0010a8b3464f02a95eec716dcd) Merge pull request #3 from deepghs/dev/order - [`42b7f3f`](https://github.com/KohakuBlueleaf/KohakuHub/commit/42b7f3f1958e9c65cf10d4f15c544982bb02704f) Raise LFS keep versions UI limit to 9999 - [`82ea9d9`](https://github.com/KohakuBlueleaf/KohakuHub/commit/82ea9d927264e58fcbe7d101135749fb99d1dc21) Merge pull request #4 from deepghs/chore/lfs-keep-versions-max-9999 - [`8667cc3`](https://github.com/KohakuBlueleaf/KohakuHub/commit/8667cc3cd7a74ef68ade282fa92035f140873290) Widen branch selector in repo viewer - [`fef57a1`](https://github.com/KohakuBlueleaf/KohakuHub/commit/fef57a1924865c10addf5943aecbbba7253f07e2) Tighten repo branch selector width ### 📊 Changes **100 files changed** (+7529 additions, -386 deletions) <details> <summary>View changed files</summary> ➕ `.coveragerc` (+21 -0) ➕ `.env.dev.example` (+51 -0) ➕ `.github/workflows/backend-fast-tests.yml` (+68 -0) 📝 `.gitignore` (+6 -0) ➕ `Makefile` (+105 -0) 📝 `config-example.toml` (+2 -1) ➕ `docs/development/local-dev.md` (+291 -0) 📝 `pyproject.toml` (+2 -1) 📝 `pytest.ini` (+10 -2) ➕ `scripts/dev/down_infra.sh` (+26 -0) ➕ `scripts/dev/init_lakefs.py` (+152 -0) ➕ `scripts/dev/reset_local_data.sh` (+51 -0) ➕ `scripts/dev/run_backend.sh` (+76 -0) ➕ `scripts/dev/seed_demo_data.py` (+1988 -0) ➕ `scripts/dev/up_infra.sh` (+184 -0) 📝 `scripts/generate_docker_compose.py` (+4 -1) 📝 `scripts/migrate_config.py` (+4 -1) 📝 `scripts/sync_lakefs_credentials.py` (+4 -1) ➕ `scripts/tests/backend_fast_state.py` (+102 -0) 📝 `src/kohaku-hub-ui/src/components/pages/RepoListPage.vue` (+43 -38) _...and 80 more files_ </details> ### 📄 Description ## Summary - add a mirrored `test/kohakuhub` fast backend suite with package-style `__init__.py` coverage across auth, repo, commit, org, quota, invitation, admin, misc, and git SSH key routes - add a deterministic SQLite + fake S3/LakeFS state harness that prepares a reusable baseline and restores data before every test - wire cross-platform test entrypoints into `scripts/tests/backend_fast_state.py`, `Makefile`, local docs, coverage config, and a GitHub Actions workflow - fix backend issues surfaced by the new suite in admin user creation, legacy quota endpoints, and fast LakeFS test doubles ## Verification - `make test-backend-fast` - `make test-backend-cov` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 20:05:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/KohakuHub#15