29 lines
796 B
PowerShell
29 lines
796 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|||
|
|
$PSNativeCommandUseErrorActionPreference = $true
|
||
|
|
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||
|
|
Set-Location -LiteralPath $projectRoot
|
||
|
|
|
||
|
|
$unformatted = gofmt -l cmd internal
|
||
|
|
if ($unformatted) {
|
||
|
|
throw "The following Go files are not formatted:`n$($unformatted -join "`n")"
|
||
|
|
}
|
||
|
|
|
||
|
|
go vet ./...
|
||
|
|
# Database-backed packages share the seeded local tenant. Run packages
|
||
|
|
# sequentially whenever integration variables are present so temporary SaaS
|
||
|
|
# fixtures cannot become visible to identity assertions in another package.
|
||
|
|
go test -p 1 '-coverprofile=coverage.out' ./...
|
||
|
|
|
||
|
|
Push-Location web
|
||
|
|
try {
|
||
|
|
npm ci
|
||
|
|
npm run generate:api
|
||
|
|
npm run typecheck
|
||
|
|
npm run build
|
||
|
|
} finally {
|
||
|
|
Pop-Location
|
||
|
|
}
|
||
|
|
|
||
|
|
docker compose config --quiet
|
||
|
|
Write-Host 'All local checks passed.'
|