-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from YOU54F/step6
chore(deps): Step-6 - Pact V2 Update
- Loading branch information
Showing
115 changed files
with
1,138 additions
and
24,686 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Pact-Workshop(GoLang) | ||
|
||
on: | ||
push: | ||
branches: | ||
- step6 | ||
pull_request: | ||
branches: | ||
- step6 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21 | ||
- name: install | ||
run: make install | ||
- name: install_pact_ffi_lib | ||
run: make install_pact_ffi_lib | ||
- name: consumer unit tests | ||
run: make unit | ||
- name: consumer pact tests | ||
run: make consumer | ||
- name: provider pact tests | ||
run: make provider || true |
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,13 +1,16 @@ | ||
TEST?=./... | ||
|
||
include ./make/config.mk | ||
|
||
install: | ||
@if [ ! -d pact/bin ]; then\ | ||
echo "--- 🛠 Installing Pact CLI dependencies";\ | ||
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 | ||
|
||
run-consumer: | ||
@go run consumer/client/cmd/main.go | ||
|
||
|
@@ -16,14 +19,16 @@ run-provider: | |
|
||
unit: | ||
@echo "--- 🔨Running Unit tests " | ||
go test -tags=unit -count=1 github.com/pact-foundation/pact-workshop-go/consumer/client -run 'TestClientUnit' | ||
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 | ||
@echo "--- 🔨Running Consumer Pact tests " | ||
go test -tags=integration -count=1 github.com/pact-foundation/pact-workshop-go/consumer/client -run 'TestClientPact' | ||
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 | ||
@echo "--- 🔨Running Provider Pact tests " | ||
go test -count=1 -tags=integration github.com/pact-foundation/pact-workshop-go/provider -run "TestPactProvider" | ||
go test -count=1 -tags=integration github.com/pact-foundation/pact-workshop-go/provider -run "TestPactProvider" -v | ||
|
||
.PHONY: install unit consumer provider run-provider run-consumer |
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.