Skip to content

Commit

Permalink
Merge commit '25e7bd815fa4f505eefe11585a6fcb1eb683a607' into step9
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Sep 4, 2024
2 parents aa744a9 + 25e7bd8 commit 713e808
Show file tree
Hide file tree
Showing 4 changed files with 430 additions and 1,068 deletions.
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
include ./make/config.mk

install:
PACT_GO_VERSION=2.0.8
PACT_DOWNLOAD_DIR=/tmp
ifeq ($(OS),Windows_NT)
PACT_DOWNLOAD_DIR=$$TMP
endif

install_cli:
@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

install_pact_ffi_lib:
go install github.com/pact-foundation/pact-go/[email protected]
sudo mkdir -p /usr/local/lib/
sudo $$HOME/go/bin/pact-go -l DEBUG install
install:
go install github.com/pact-foundation/pact-go/v2@v$(PACT_GO_VERSION)
pact-go -l DEBUG install --libDir $(PACT_DOWNLOAD_DIR);

run-consumer:
@go run consumer/client/cmd/main.go
Expand All @@ -22,12 +27,12 @@ unit:
go test -tags=unit -count=1 github.com/pact-foundation/pact-workshop-go/consumer/client -run 'TestClientUnit' -v

consumer: export PACT_TEST := true
consumer: install
consumer:
@echo "--- 🔨Running Consumer Pact tests "
go test -tags=integration -count=1 github.com/pact-foundation/pact-workshop-go/consumer/client -run 'TestClientPact' -v

provider: export PACT_TEST := true
provider: install
provider:
@echo "--- 🔨Running Provider Pact tests "
go test -count=1 -tags=integration github.com/pact-foundation/pact-workshop-go/provider -run "TestPactProvider" -v

Expand Down
Loading

0 comments on commit 713e808

Please sign in to comment.