From bd64154e1bca52bae794e72c6b8e7f58dfa55d5b Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Sat, 2 Mar 2024 13:59:21 +0000 Subject: [PATCH] skip avro windows --- .github/workflows/test.yml | 5 +---- Makefile | 6 ++++-- examples/avro/avro_consumer_test.go | 4 ++-- examples/avro/avro_provider_test.go | 4 ++-- examples/avro/codec.go | 3 ++- examples/avro/user.go | 2 ++ 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0eb1d44a7..6a95578d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,10 +56,7 @@ jobs: # - name: Test examples # if: runner.os == 'Linux' # run: APP_BRANCH=${APP_REF:11} DOCKER_GATEWAY_HOST=172.17.0.1 DOCKER_HOST_HTTP="http://172.17.0.1" make ci_pact - - - if: runner.os == 'Windows' - run: rm 'C:\Windows\System32\bash.exe' - + - name: Unit Test if: runner.os != 'Linux' run: make ci_unit_no_docker diff --git a/Makefile b/Makefile index 455eb6845..d8243ea66 100755 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ PACT_CLI="docker run --rm -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL=$(DOCKER_HOST ifeq ($(OS),Windows_NT) EXE=.exe + SKIP_AVRO=1 endif ci:: docker deps clean bin test pact ci_unit:: deps clean bin test @@ -54,8 +55,9 @@ deps: download_plugins download_plugins: @echo "--- 🐿 Installing plugins"; \ ./scripts/install-cli.sh - $$HOME/.pact/bin/pact-plugin-cli$(EXE) -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.5 - + if [ $${SKIP_AVRO:-0} -ne 1 ]; then \ + $$HOME/.pact/bin/pact-plugin-cli$(EXE) -y install https://github.com/austek/pact-avro-plugin/releases/tag/v0.0.5; \ + fi cli: @if [ ! -d pact/bin ]; then\ echo "--- 🐿 Installing Pact CLI dependencies"; \ diff --git a/examples/avro/avro_consumer_test.go b/examples/avro/avro_consumer_test.go index 07111c749..e75bc9572 100644 --- a/examples/avro/avro_consumer_test.go +++ b/examples/avro/avro_consumer_test.go @@ -1,5 +1,5 @@ -//go:build consumer -// +build consumer +//go:build consumer || darwin || linux +// +build consumer darwin linux package avro diff --git a/examples/avro/avro_provider_test.go b/examples/avro/avro_provider_test.go index d8cbaf331..c4a1bb847 100644 --- a/examples/avro/avro_provider_test.go +++ b/examples/avro/avro_provider_test.go @@ -1,5 +1,5 @@ -//go:build provider -// +build provider +//go:build provider || darwin || linux +// +build provider darwin linux package avro diff --git a/examples/avro/codec.go b/examples/avro/codec.go index fb4d2aca8..80c32c03f 100644 --- a/examples/avro/codec.go +++ b/examples/avro/codec.go @@ -1,8 +1,9 @@ +//go:build darwin || linux package avro import ( - "os" + "github.com/linkedin/goavro/v2" ) diff --git a/examples/avro/user.go b/examples/avro/user.go index 390c36a1a..a9bcb6f92 100644 --- a/examples/avro/user.go +++ b/examples/avro/user.go @@ -1,3 +1,5 @@ +//go:build darwin || linux + package avro type User struct {