feat: add tenant and user management with migrations, handlers, and tests
- Implemented tenant and user management features including: - Tenant creation and management with associated migrations. - User creation and management with associated migrations. - Tenant membership management with associated migrations. - Platform user roles management with associated migrations. - Quota management with associated migrations. - Article and template management with associated migrations. - Added HTTP handlers for templates and workspaces. - Created tests for protected and public routes. - Introduced a script to check tenant scope in SQL queries. - Documented task plan for backend completion and frontend foundation.
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: Backend CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "server/**"
|
||||
- ".github/workflows/backend-ci.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "server/**"
|
||||
- ".github/workflows/backend-ci.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
backend:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: server
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: server/go.mod
|
||||
cache-dependency-path: server/go.sum
|
||||
|
||||
- name: Add Go bin to PATH
|
||||
run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Install sqlc
|
||||
run: go install github.com/sqlc-dev/sqlc/cmd/sqlc@v1.30.0
|
||||
|
||||
- name: Generate sqlc code
|
||||
run: make sqlc-generate
|
||||
|
||||
- name: Verify generated code is committed
|
||||
run: git diff --exit-code -- internal/tenant/repository/generated
|
||||
|
||||
- name: Check tenant SQL scope guard
|
||||
run: make tenant-scope-guard
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
||||
|
||||
- name: Run golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.59.1
|
||||
working-directory: server
|
||||
args: ./...
|
||||
Reference in New Issue
Block a user