build: Simplify Circle-CI run; use Go Module proxy
This commit is contained in:
parent
18eab5520f
commit
938b3d3319
@ -5,19 +5,16 @@ jobs:
|
||||
- image: circleci/golang:1.12
|
||||
environment:
|
||||
GO111MODULE: "on"
|
||||
GOPROXY: "https://proxy.golang.org"
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: "Prepare Artifact Store"
|
||||
command: |
|
||||
mkdir -p /tmp/artifacts
|
||||
- restore_cache:
|
||||
keys:
|
||||
- v1-mod-cache
|
||||
- run:
|
||||
name: "Tests"
|
||||
command: |
|
||||
.circleci/test.sh
|
||||
go test ./...
|
||||
- save_cache:
|
||||
key: v1-mod-cache
|
||||
paths:
|
||||
|
@ -1,12 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
echo "" > coverage.txt
|
||||
|
||||
for d in $(go list ./... | grep -v vendor); do
|
||||
go test -coverprofile=/tmp/artifacts/profile.out -covermode=atomic $d
|
||||
if [ -f /tmp/artifacts/profile.out ]; then
|
||||
cat /tmp/artifacts/profile.out >> /tmp/artifacts/coverage.txt
|
||||
rm /tmp/artifacts/profile.out
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user