-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add windows runners #443
Conversation
"CGO_LDFLAGS=-L$env:TMP" >> $env:GITHUB_ENV | ||
"$env:TMP" >> $env:GITHUB_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documented in #442
- name: Test (unit) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: make test | ||
- name: Test (pact) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: make pact_local | ||
- name: Install goveralls | ||
if: matrix.os != 'windows-latest' | ||
run: go install github.com/mattn/goveralls@latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goveralls had an error on windows, but a yak shave for another day
@@ -61,10 +65,6 @@ clean: | |||
rm -rf build output dist examples/pacts | |||
|
|||
deps: download_plugins | |||
@echo "--- 🐿 Fetching build dependencies " | |||
cd /tmp; \ | |||
go install github.com/mitchellh/gox@latest; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't look to be used in this repo, and the repo is archived. May be a hangover from pact-go v1
@@ -11,6 +11,10 @@ PLUGIN_PACT_AVRO_VERSION=0.0.5 | |||
|
|||
GO_VERSION?=1.22 | |||
ci:: docker deps clean bin test pact | |||
PACT_DOWNLOAD_DIR=/tmp | |||
ifeq ($(OS),Windows_NT) | |||
PACT_DOWNLOAD_DIR=$$TMP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use TMP var which is available in powershell and cmd prompt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each plugin test split out into its own test, and assertions added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each plugin test split out into its own test, and assertions added
rationale for splitting them up, was to isolate individual plugins, and re-enable them when trying to diagnose the shutdown failures on windows
}) | ||
|
||
assert.Error(t, err) | ||
// assert.Equal(t, "Did not receive any requests for path 'PactPlugin/InitPlugin'", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is suspect, where a consumer has setup as gRPC request, and the expected request hasn't been issued.
It previously didn't have an assertion and the error message isn't helpful to users
One would expect to see Did not receive any requests for path 'PactPlugin/InitPlugin'
synchronous_message_test.go:130:
Error Trace: /Users/saf/dev/pact-foundation/pact-go/message/v4/synchronous_message_test.go:130
Error:
Not equal:
expected: string("Did not receive any requests for path 'PactPlugin/InitPlugin'")
actual : *errors.errorString(&errors.errorString{s:"pact validation failed: [{Request:{Method: Path:PactPlugin/InitPlugin Query: Headers:map[] Body:<nil>} Mismatches:[] Type:}]"})
The logs show a sane error, which I've multi-lined for readability
2024-07-04T01:36:33.745740Z DEBUG ThreadId(01) pact_plugin_driver::plugin_manager:
Got response: ShutdownMockServerResponse
{ ok: false,
results: [
MockServerResult
{
path: "PactPlugin/InitPlugin",
error: "Did not receive any requests for path 'PactPlugin/InitPlugin'",
mismatches: [] }
] }
grpc import paths are reversed on windows and require resolving when passed to the pact-protobuf-plugin
…ATH to pact_ffi.dll
Should be good to go now, still got to look at the avro plugin loading on windows but that can be followed up later |
Caveats
avro
plugin fails to run at point of install time viapact-plugin-cli
all plugins fail to cleanly shutdown after execution, and they can only be closed externally via the task manager. This is causing tests to fail in GitHub actions.Fixed by fix: win plugin shutdown pact-plugins#67