A high-performance, extremely lightweight Git service built with Zig and SvelteKit.
git.station/
├── backend/ # Zig backend
├── frontend/ # SvelteKit frontend
└── scripts/ # Helper scripts
cd backend
zig build
zig build run
# zig build && zig build run
cd frontend
npm install
npm run dev
Git Station includes a comprehensive test suite for the backend components. Tests can be run either locally or in Docker.
The run-tests.sh
script in the backend
directory provides various options for running tests:
cd backend
sh run-tests.sh [options]
--all
: Run all tests (default)--git
: Run only Git-related tests--db
: Run only database tests--auth
: Run only authentication tests--unit
: Run only unit tests--local
: Run tests locally instead of in Docker--help
: Show help messageRun all tests in Docker (requires Docker and docker-compose):
sh run-tests.sh
Run only Git tests locally:
sh run-tests.sh --git --local
Run database tests locally:
sh run-tests.sh --db --local
Tests are automatically run on every push to the master
branch and on all pull requests through GitHub Actions. The workflow:
You can view test results in the "Actions" tab of the repository.
To run the same CI tests locally before pushing:
cd backend
./run-tests.sh
For local testing, you need:
On macOS, you can install these with Homebrew:
brew install zig libgit2 sqlite3
On Linux (Debian/Ubuntu):
apt-get install zig libgit2-dev libsqlite3-dev
For Docker-based testing, you need:
The Docker setup handles all dependencies automatically.
The test suite is organized into several modules:
Each test module can be run independently or as part of the complete test suite.
MIT