-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Adds support for pending pacts - Adds support for selectors - Cleans up build system to use Make and reduces reliance on legacy build scripts Fixes #124
- Loading branch information
Showing
233 changed files
with
72,607 additions
and
35,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
language: go | ||
|
||
go: | ||
- 1.9.x | ||
- 1.10.x | ||
|
||
services: | ||
- docker | ||
|
||
env: | ||
global: | ||
secure: LN8/2VY4tvHcCzIVlpy+x3KIlkFNGrwQmQadLR3oT0nJWmkZQhE5f+InAPaQNDm3siJcNG0wLCo0iLw6JN1esF/VQPrsHrW3MAkbKyNsdYnSZUZJ6Zs6MmBoigHy4qWuFayGhChgMHqhyXf6q8B5KhJb3vKKn/WW4nsU8tfpk1jdr8mdRcFEfjViQake5vZUb93gy3sXJxz6NlEaYZcrY25c/iOd06oOQZlCCyz5FhkArBKK95jbeMr5LO/5Xlkg1pIHE571Distoc4e3+ZfzW/yQCsgrZNcLElV96mvRHw/x8k2Bb7UgXQbNPX/mxV7bJCHVjhmIkwP8JKOFEs9AD0nWWjXWA1PlG7MdQoZTCoAnZWUCCsMVDDg/sg7/Vlzf+szYCoz0NE2v0Z1+v9h/itljaSHa0H9u2G/mkvZio377ou0AK54OIXDcPP0BmXvA8uJV6U3hCubWOnF0uwSCrysKEThxD/OFm90IIyLY8LKlsgHsFTkSTiApI//xRfm4NBF1sSg4V2FCzAMJx6596ekIcWgfoVUpSiOKiktwXnZha6XtHENDJeGuNpywowPInvYDZHCHYscCnre6MKTMttmb/q4JgSJEnn2vatRwXQbglzXhCDH7dw/a/75LSUT5Exj0f2HWpxDy+pi+nzITxZoFT+syNFwDvSRMT/wKLU= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,72 @@ | ||
include make/config.mk | ||
|
||
TEST?=./... | ||
|
||
.DEFAULT_GOAL := ci | ||
|
||
ci:: clean bin tools test pact goveralls | ||
ci:: docker deps clean bin test pact goveralls | ||
|
||
docker: | ||
@echo "--- 🛠 Starting docker" | ||
docker-compose up -d | ||
|
||
bin: | ||
@sh -c "$(CURDIR)/scripts/build.sh" | ||
gox -os="darwin" -arch="amd64" -output="build/pact-go_{{.OS}}_{{.Arch}}" | ||
gox -os="windows" -arch="386" -output="build/pact-go_{{.OS}}_{{.Arch}}" | ||
gox -os="linux" -arch="386" -output="build/pact-go_{{.OS}}_{{.Arch}}" | ||
gox -os="linux" -arch="amd64" -output="build/pact-go_{{.OS}}_{{.Arch}}" | ||
@echo "==> Results:" | ||
ls -hl build/ | ||
|
||
clean: | ||
@sh -c "$(CURDIR)/scripts/clean.sh" | ||
rm -rf build output dist | ||
|
||
deps: | ||
@echo "--- 🐿 Fetching build dependencies " | ||
go get github.com/axw/gocov/gocov | ||
go get github.com/mattn/goveralls | ||
go get golang.org/x/tools/cmd/cover | ||
go get github.com/modocache/gover | ||
go get github.com/mitchellh/gox | ||
|
||
goveralls: | ||
goveralls -service="travis-ci" -coverprofile=coverage.txt -repotoken $(COVERALLS_TOKEN) | ||
|
||
dev: | ||
@TF_DEV=1 sh -c "$(CURDIR)/scripts/dev.sh" | ||
install: | ||
@if [ ! -d pact/bin ]; then\ | ||
echo "--- 🐿 Installing Pact CLI dependencies";\ | ||
curl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/master/install.sh | bash;\ | ||
fi | ||
|
||
test: | ||
"$(CURDIR)/scripts/test.sh" | ||
pact: install docker | ||
@echo "--- 🔨 Running Pact examples" | ||
go test -tags=consumer -count=1 github.com/pact-foundation/pact-go/examples/... -run TestExample | ||
go test -tags=provider -count=1 github.com/pact-foundation/pact-go/examples/... -run TestExample | ||
|
||
release: | ||
echo "--- 🚀 Releasing it" | ||
"$(CURDIR)/scripts/release.sh" | ||
|
||
pact: | ||
"$(CURDIR)/scripts/pact.sh" | ||
test: deps | ||
@echo "--- ✅ Running tests" | ||
@if [ -f coverage.txt ]; then rm coverage.txt; fi; | ||
@echo "mode: count" > coverage.txt | ||
@for d in $$(go list ./... | grep -v vendor | grep -v examples); \ | ||
do \ | ||
go test -race -coverprofile=profile.out -covermode=atomic $$d; \ | ||
if [ -f profile.out ]; then \ | ||
cat profile.out | tail -n +2 >> coverage.txt; \ | ||
rm profile.out; \ | ||
fi; \ | ||
done; \ | ||
|
||
testrace: | ||
go test -race $(TEST) $(TESTARGS) | ||
go tool cover -func coverage.txt | ||
|
||
tools: | ||
"$(CURDIR)/scripts/install-cli-tools.sh" | ||
|
||
goveralls: | ||
"$(CURDIR)/scripts/goveralls.sh" | ||
testrace: | ||
go test -race $(TEST) $(TESTARGS) | ||
|
||
updatedeps: | ||
go get -d -v -p 2 ./... | ||
|
||
.PHONY: bin default dev test pact updatedeps clean release | ||
.PHONY: install bin default dev test pact updatedeps clean release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
version: '3.6' | ||
version: "3" | ||
|
||
services: | ||
pact: | ||
build: ./ | ||
command: bash | ||
volumes: | ||
- .:/go/src/github.com/pact-foundation/pact-go | ||
httpbin: | ||
image: kennethreitz/httpbin | ||
ports: | ||
- "8000:80" | ||
|
||
postgres: | ||
image: postgres | ||
healthcheck: | ||
test: psql postgres --command "select 1" -U postgres | ||
ports: | ||
- "5432:5432" | ||
environment: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: password | ||
POSTGRES_DB: postgres | ||
|
||
broker_app: | ||
image: dius/pact-broker | ||
links: | ||
- postgres | ||
ports: | ||
- 80:80 | ||
environment: | ||
PACT_BROKER_BASIC_AUTH_USERNAME: pact_workshop | ||
PACT_BROKER_BASIC_AUTH_PASSWORD: pact_workshop | ||
PACT_BROKER_DATABASE_USERNAME: postgres | ||
PACT_BROKER_DATABASE_PASSWORD: password | ||
PACT_BROKER_DATABASE_HOST: postgres | ||
PACT_BROKER_DATABASE_NAME: postgres |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.