API & Development
Testing & CI/CD
Testing strategies, Taskfile automation, and continuous integration workflows.
Testing & CI/CD
Alexandria uses strict quality gates across both unit tests and integration tests.
Running Tests
Testing commands are orchestrated via Taskfile.yaml:
Unit Tests
Executes unit tests with race detection and generates a coverage profile (coverage.out):
task testInspect coverage interactively in the browser:
task coverIntegration Tests
Integration tests run against live wallet backends and require the -tags="integration,jwx_es256k" build tags:
# Run all integration tests
task test:integration
# Test Fafnir adapter specifically
task test:integration:fafnir
# Test IdentityHub adapter specifically
task test:integration:identityhub
# Run both unit and integration tests
task test:allCode Quality & Linters
Before submitting pull requests, run the full validation pipeline:
task checkThis task runs:
task fmt: Formats all Go files usinggofumpt.task lint: Runs static analysis withgolangci-lint.task test: Runs unit tests with race detection.
Additional checks:
# Verify module dependencies are clean
task tidy
# Scan codebase for known vulnerabilities
task vulnContinuous Integration (GitHub Actions)
Alexandria runs two primary workflows on GitHub Actions:
-
ci.yaml:- Triggers on every push to
mainand all Pull Requests. - Enforces
go mod tidysynchronization. - Runs
gofumptformat checks,go vet,golangci-lint, and race tests. - Scans dependencies with
govulncheck. - Verifies full binary compilation into
/dev/null.
- Triggers on every push to
-
deploy-docs.yaml:- Triggers on push to
mainand manual trigger (workflow_dispatch). - Compiles static Next.js/Fumadocs documentation.
- Deploys static build to GitHub Pages at
https://caparicio-esd.github.io/alexandria/.
- Triggers on push to