mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
* Do not download modules during CI build * install golint in non module system * Use vendor in tests + update vendor dir * mod tidy
22 lines
477 B
Bash
Executable File
22 lines
477 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# test_unit.sh
|
|
|
|
if [ -z ${GO_ENV} ]; then
|
|
export GO_ENV="test"
|
|
fi
|
|
|
|
if [ -z ${ATHENS_MINIO_ENDPOINT} ]; then
|
|
export ATHENS_MINIO_ENDPOINT="127.0.0.1:9001"
|
|
fi
|
|
|
|
if [ -z ${ATHENS_MONGO_STORAGE_URL} ]; then
|
|
export ATHENS_MONGO_STORAGE_URL="mongodb://127.0.0.1:27017"
|
|
fi
|
|
|
|
export GO111MODULE=on
|
|
|
|
# Run the unit tests with the race detector and code coverage enabled
|
|
set -xeuo pipefail
|
|
go test -mod=vendor -race -coverprofile cover.out -covermode atomic ./...
|