Public source validation / validate (push) Failing after 3m8s
15 lines
602 B
PowerShell
15 lines
602 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$PSNativeCommandUseErrorActionPreference = $true
|
|
Set-Location (Split-Path -Parent $PSScriptRoot)
|
|
|
|
if (-not (Get-Command go -ErrorAction SilentlyContinue)) {
|
|
$cachedGo = Join-Path $env:LOCALAPPDATA 'ITWorx-Pulse\toolchains\go1.26.6\bin'
|
|
if (-not (Test-Path (Join-Path $cachedGo 'go.exe'))) { throw 'Go 1.26.6 is not available on PATH or in the recorded local toolchain cache.' }
|
|
$env:PATH = $cachedGo + ';' + $env:PATH
|
|
}
|
|
|
|
$unformatted = gofmt -l cmd internal
|
|
if ($unformatted) { throw "Go files need formatting: $($unformatted -join ', ')" }
|
|
go vet ./...
|
|
pnpm lint
|