pact-foundation / pact-go

Golang version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
http://pact.io
MIT License
834 stars 104 forks source link

ci: MacOS arm64/x86_64 + Dockerfile #416

Open YOU54F opened 1 month ago

YOU54F commented 1 month ago

Additional tested CI platforms

Considerations

Some environments do not have access to Docker, which affects running examples

Necessary amendments made via

GoLang version updates

Plugins

Yak shaves

YOU54F commented 1 month ago

hmmm 🤔 publish is failing.

Either PACT_BROKER_TOKEN secret is out of date (plausible) or is inaccessible via PR workflow, via fork.

Might need to disable the examples, or conditionally only publish pact (and run the pact tests which require a broker to verify), on source builds, and skip on fork based PR's

YOU54F commented 1 month ago

Kicked off a build on a branch in this repo, rather than a fork

https://github.com/pact-foundation/pact-go/actions/runs/8991563189

Skipping all the e2e tests from a fork based workflows is a big 🔨 , but easy to implement in a gh workflow (only run if repo owner is pact-foundation) but misses running alot of the tests.

Maybe just tagging broker based tests and running them separately would make it easy for contributor to run most of the examples on their machine or via CI, without having to worry about setting up a pact broker which is externally available for all platforms.

We could avoid using a hosted pact broker in GHA, if we could just run a local pact broker via ruby directly