This project provides an overview dashboard for test environments (test sites) managed via the Upsun platform. It fetches environment data using the Upsun API and displays a list of active PR environments in a web interface.
- Lists active PR environments for a given Upsun project
- OAuth-based authentication to the Upsun API
- Simple, fast Go web server
- Uses templ for HTML rendering
- Go 1.21 or newer
- An Upsun API token and project ID
-
Clone the repository:
git clone https://github.com/reload/testsite-overview.git cd testsite-overview -
Set the required environment variables:
UPSUN_API_TOKEN: Your Upsun API tokenUPSUN_PROJECT_ID: The ID of your Upsun project- (Optional)
PORT: Port for the web server (default: 80) - (Optional)
TITLE: Custom title for the dashboard - (Optional)
LINK_REGEXP: Custom regexp for filtering environment URLs
go build
./testsite-overviewTo ensure code quality, run:
golangci-lint run ./...
go tool nilaway ./...Currently, there are no automated tests. You can add Go test files to increase coverage.
main.go— Main application logic and HTTP serverpage_templ.go/page.templ— Templ components for HTML renderingDockerfile— Containerization supportAGENTS.md— Agent automation and workflow documentation
- Follows Go best practices for code style and documentation
- Uses
golangci-lintandnilawayfor static analysis - See AGENTS.md for automation and agent workflow details
See LICENSE.md