mirror of
https://github.com/gomods/athens
synced 2026-02-03 13:20:30 +00:00
do not read .env file , sync with the bash version (#689)
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
# Run the unit tests with the race detector and code coverage enabled
|
||||
|
||||
$envPath = Join-Path "cmd" "proxy" | Join-Path -ChildPath ".env"
|
||||
Get-Content $envPath | ForEach-Object {
|
||||
$line = $_.ToString().Split("=")
|
||||
if ($line.Length -ne 2) {
|
||||
return
|
||||
}
|
||||
$name = $line[0]
|
||||
$val = $line[1]
|
||||
|
||||
[System.Environment]::SetEnvironmentVariable($name, $val)
|
||||
}
|
||||
if (!(Test-Path env:GO_ENV)) {$env:GO_ENV = "test"}
|
||||
|
||||
& go test -mod=vendor -race -coverprofile cover.out -covermode atomic ./...
|
||||
|
||||
Reference in New Issue
Block a user