copy .git folder explicity

This commit is contained in:
Dominic Breuker
2018-03-09 17:30:33 +01:00
parent 246e4f6b2d
commit a5bf551d96
5 changed files with 5 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
version: 2
jobs:
build:
machine: true
image: docker:17.05.0-ce-git
docker:
- image: docker:17.05.0-ce-git
steps:
- checkout
- setup_remote_docker
- run: docker build -f ./docker/Dockerfile.testing -t local/pspy-testing:latest .
- run: docker run -it -v `pwd`/.git:/go/src/github.com/dominicbreuker/pspy/.git -e CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID local/pspy-testing:latest
- run: docker run -it -e CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID local/pspy-testing:latest

View File

@@ -1,3 +1,2 @@
.git
.gitignore
images/

View File

@@ -8,7 +8,7 @@ TEST_DOCKERFILE = $(PROJECT_DIR)/docker/Dockerfile.testing
test:
docker build -f $(TEST_DOCKERFILE) -t $(TEST_IMAGE) .
docker run -it --rm -v $(PROJECT_DIR)/.git:/go/src/github.com/dominicbreuker/pspy/.git $(TEST_IMAGE)
docker run -it --rm $(TEST_IMAGE)
dev-build:
docker build -f $(DEV_DOCKERFILE) -t $(DEV_IMAGE) .

View File

@@ -9,6 +9,7 @@ COPY main.go /go/src/github.com/dominicbreuker/pspy/main.go
COPY cmd /go/src/github.com/dominicbreuker/pspy/cmd
COPY internal /go/src/github.com/dominicbreuker/pspy/internal
COPY vendor /go/src/github.com/dominicbreuker/pspy/vendor
COPY .git /go/src/github.com/dominicbreuker/pspy/.git
# run tests
WORKDIR /go/src/github.com/dominicbreuker/pspy

View File

@@ -18,14 +18,12 @@ else
./cc-test-reporter before-build
for pkg in $(go list ./... | grep -v main); do
echo "doing $pkg"
go test -coverprofile=$(echo $pkg | tr / -).cover $pkg
done
echo "mode: set" > c.out
grep -h -v "^mode:" ./*.cover >> c.out
rm -f *.cover
echo "reporting now"
./cc-test-reporter after-build
rm c.out