Skip to content

Commit

Permalink
Merge commit '7f7c476b05d4abc06e895c626944051ef92aebd1' into step10
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Sep 4, 2024
2 parents 9b9561a + 7f7c476 commit 0a66fe6
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 1,087 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
go-version: 1.21
- name: install
run: make install
- name: install_pact_ffi_lib
run: make install_pact_ffi_lib
- name: install_cli
run: make install_cli
- name: consumer unit tests
run: make unit
- name: consumer pact tests
Expand Down
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 0a66fe6

Please sign in to comment.