mirror of
https://github.com/DominicBreuker/pspy.git
synced 2025-12-20 11:14:51 +00:00
copy .git folder explicity
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
.git
|
||||
.gitignore
|
||||
images/
|
||||
|
||||
2
Makefile
2
Makefile
@@ -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) .
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user