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
|
- image: circleci/golang:1.12
|
||||||
environment:
|
environment:
|
||||||
GO111MODULE: "on"
|
GO111MODULE: "on"
|
||||||
|
GOPROXY: "https://proxy.golang.org"
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
|
||||||
name: "Prepare Artifact Store"
|
|
||||||
command: |
|
|
||||||
mkdir -p /tmp/artifacts
|
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- v1-mod-cache
|
- v1-mod-cache
|
||||||
- run:
|
- run:
|
||||||
name: "Tests"
|
name: "Tests"
|
||||||
command: |
|
command: |
|
||||||
.circleci/test.sh
|
go test ./...
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: v1-mod-cache
|
key: v1-mod-cache
|
||||||
paths:
|
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