From c23051d8909b0ec709f48b533fffc5328f1f35df Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Thu, 25 Apr 2024 16:26:43 +0100 Subject: [PATCH] chore: expect pact binary in ~/.pact/bin --- .github/workflows/examples.yml | 22 +++++++++++----------- .github/workflows/gradle.yml | 4 ++-- .github/workflows/rust.yml | 4 ++-- scripts/run-grpc-examples.sh | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 9fb519c0..5e1ee6f7 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -31,10 +31,10 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Install csv plugin - run: ~/bin/pact-plugin-cli -y install csv + run: ~/.pact/bin/pact-plugin-cli -y install csv shell: bash - name: Install Pact verifier run: scripts/install-verifier-cli.sh @@ -51,8 +51,8 @@ jobs: nohup ./target/debug/csv-provider & PID=$! trap "kill $PID" EXIT - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../csv-consumer-rust/target/pacts/CsvClient-CsvServer.json -p 8080 - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../csv-consumer-jvm/build/pacts/CsvClient-CsvServer.json -p 8080 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../csv-consumer-rust/target/pacts/CsvClient-CsvServer.json -p 8080 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../csv-consumer-jvm/build/pacts/CsvClient-CsvServer.json -p 8080 cd ../csv-provider-jvm mkdir -p server/src/test/resources/pacts cp ../csv-consumer-jvm/build/pacts/CsvClient-CsvServer.json server/src/test/resources/pacts @@ -70,7 +70,7 @@ jobs: nohup ./target/debug/csv-provider & PID=$! trap "kill $PID" EXIT - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../csv-consumer-jvm/build/pacts/CsvClient-CsvServer.json -p 8080 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../csv-consumer-jvm/build/pacts/CsvClient-CsvServer.json -p 8080 shell: bash working-directory: examples/csv if: runner.os == 'Windows' @@ -110,7 +110,7 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Install Pact verifier run: scripts/install-verifier-cli.sh @@ -138,8 +138,8 @@ jobs: PID=$! trap "kill $PID" EXIT timeout --foreground -s TERM 30s bash -c 'while [[ "$(curl -s -o /dev/null -m 3 -L -w ''%{http_code}'' -XPOST -d'{}' http://127.0.0.1:8111)" != "200" ]]; do echo "Waiting for http://127.0.0.1:8111" && sleep 2; done' - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../protobuf-consumer-rust/target/pacts/protobuf-consumer-rust-protobuf-provider.json -p 8111 - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../protobuf-consumer-jvm/build/pacts/protobuf-consumer-protobuf-provider.json -p 8111 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../protobuf-consumer-rust/target/pacts/protobuf-consumer-rust-protobuf-provider.json -p 8111 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../protobuf-consumer-jvm/build/pacts/protobuf-consumer-protobuf-provider.json -p 8111 shell: bash working-directory: examples/protobuf if: runner.os == 'Linux' @@ -158,8 +158,8 @@ jobs: PID=$! trap "kill $PID" EXIT timeout --foreground -s TERM 30s bash -c 'while [[ "$(curl -s -o /dev/null -m 3 -L -w ''%{http_code}'' -XPOST -d'{}' http://127.0.0.1:8111)" != "200" ]]; do echo "Waiting for http://127.0.0.1:8111" && sleep 2; done' - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../protobuf-consumer-rust/target/pacts/protobuf-consumer-rust-protobuf-provider.json -p 8111 - pact_do_not_track=true ~/bin/pact_verifier_cli -f ../protobuf-consumer-jvm/build/pacts/protobuf-consumer-protobuf-provider.json -p 8111 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../protobuf-consumer-rust/target/pacts/protobuf-consumer-rust-protobuf-provider.json -p 8111 + pact_do_not_track=true ~/.pact/bin/pact_verifier_cli -f ../protobuf-consumer-jvm/build/pacts/protobuf-consumer-protobuf-provider.json -p 8111 shell: bash working-directory: examples/protobuf if: runner.os != 'Linux' @@ -199,7 +199,7 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Install Pact verifier run: scripts/install-verifier-cli.sh diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 91e13f18..5d30dfc9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -28,7 +28,7 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Run plugin driver tests run: ./gradlew -s --no-daemon -i check @@ -61,7 +61,7 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Run plugin driver tests run: ./gradlew -s --no-daemon -i check diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0ea5ed7e..61def866 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,10 +24,10 @@ jobs: run: scripts/install-plugin-cli.sh shell: bash - name: Install Protobuf plugin - run: ~/bin/pact-plugin-cli -y install protobuf + run: ~/.pact/bin/pact-plugin-cli -y install protobuf shell: bash - name: Install csv plugin - run: ~/bin/pact-plugin-cli -y install csv + run: ~/.pact/bin/pact-plugin-cli -y install csv shell: bash - name: Tests run: cargo test diff --git a/scripts/run-grpc-examples.sh b/scripts/run-grpc-examples.sh index a8cb4291..b6902359 100755 --- a/scripts/run-grpc-examples.sh +++ b/scripts/run-grpc-examples.sh @@ -44,7 +44,7 @@ trap "kill $PID" EXIT sleep 1 ls -la PROVIDER_PORT=$(cat provider.go.out | cut -f4 -d:) -~/bin/pact_verifier_cli -f ../consumer-jvm/build/pacts/grpc-consumer-jvm-area-calculator-provider.json\ +~/.pact/bin/pact_verifier_cli -f ../consumer-jvm/build/pacts/grpc-consumer-jvm-area-calculator-provider.json\ -f ../consumer-rust/target/pacts/grpc-consumer-rust-area-calculator-provider.json\ -f ../consumer-go/pacts/grpc-consumer-go-area-calculator-provider.json\ -p "$PROVIDER_PORT"