Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initiate go module #1150

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 5 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
version: 2
jobs:
deps:
docker:
- image: circleci/golang:1.13
environment:
GOPATH: /home/circleci/.go_workspace
working_directory: /home/circleci/.go_workspace/src/github.com/loadimpact/k6
steps:
- checkout
- run:
name: Check dependencies
command: |
go version
export PATH="$GOPATH/bin:$PATH"
mkdir -p "$GOPATH/bin"
curl --fail https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep version
dep status
dep ensure -update -dry-run


test:
docker:
- image: circleci/golang:1.13
Expand All @@ -34,9 +14,10 @@ jobs:
go version
export GOMAXPROCS=2
export PATH=$GOPATH/bin:$PATH
export GO111MODULE=on
echo "mode: set" > coverage.txt
for pkg in $(go list ./... | grep -v vendor); do
go test -race -timeout 800s --coverpkg="$(go list ./... | tr '\n' ',')" -coverprofile=$(echo $pkg | tr / -).coverage $pkg
for pkg in $(go list ./...); do
go test -race -timeout 800s --coverpkg="$pkg" -coverprofile=$(echo $pkg | tr / -).coverage ${pkg/github.com\/loadimpact\/k6/.}
done
grep -h -v "^mode:" *.coverage >> coverage.txt
rm -f *.coverage
Expand All @@ -57,6 +38,7 @@ jobs:
go version
export GOMAXPROCS=2
export PATH=$GOPATH/bin:$PATH
export GO111MODULE=on
go test -p 2 -race -timeout 800s ./...

build-docker-images:
Expand Down Expand Up @@ -133,7 +115,7 @@ jobs:
cd $GOPATH/src/github.com/loadimpact/k6

echo "Building k6..."
CGO_ENABLED=0 GOARCH=$ARCH go build -a -ldflags '-s -w' -o /tmp/k6
CGO_ENABLED=0 GOARCH=$ARCH GO111MODULE=on go build -a -ldflags '-s -w' -o /tmp/k6
echo "Done!"

VERSION=${CIRCLE_TAG:1} ./packaging/gen-packages.sh
Expand All @@ -150,10 +132,6 @@ workflows:
version: 2
test_and_build:
jobs:
- deps:
filters:
tags:
only: /.*/
- test:
filters:
tags:
Expand All @@ -164,14 +142,12 @@ workflows:
only: /.*/
- build-docker-images:
requires:
- deps
- test
filters:
tags:
only: /.*/
- build-linux-packages:
requires:
- deps
- test
filters:
branches:
Expand Down
Loading