Skip to content
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: MacOS arm64/x86_64 + Dockerfile #416

Closed
wants to merge 19 commits into from

Conversation

YOU54F
Copy link
Member

@YOU54F YOU54F commented May 7, 2024

Additional tested CI platforms

  • Test MacOS x86_64 via macos-12 runner
  • Test MacOS arm64 via macos-latest runner
  • Test Linux amd64 Dockerfile build
    • updates Dockerfile to support running Pact Go V2

Considerations

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

  • No access to invoke pact cli tools via existing Makefile provision
  • No access to Pact broker via existing docker-compose

Necessary amendments made via

  • Update Makefile to support running Pact Broker Client tools to support CI envs without access to Docker (MacOS / Windows GHA)
    • Docker
    • RubyGems
    • Standalone CLI
  • Update Makefile to allow for
    • local pact broker setup via docker-compose (in Linux GHA, or users local machine)
    • hosted pact broker (OSS with Basic Auth or PactFlow with Bearer Token)
  • Update GHA workflow to publish pacts to hosted PactFlow instance

GoLang version updates

  • Adds 1.22 to testing matrix for Linux/MacOS
  • 1.22 error with -race enabled on platforms, so these have been added with experimental: true to allow these to be tested, but not impede green builds for the moment. Hopefully fixed in a later GoLang release. Relates to Runtime error occurs with golang 1.22.x #402
    • linux/amd64
    • macos/amd64
  • Added support for SKIP_RACE to test without -race set

Plugins

  • Updates plugins to latest versions
    • bar pact-plugin-cli, latest version has no x86_64 binary. awaiting release
  • Detect if plugin is already installed, and skip if so
  • Allow skipping download of all plugins SKIP_PLUGINS
  • Allow skipping download of certain plugin SKIP_PLUGIN_AVRO

Yak shaves

  • occasional seg faults, which cause flaky builds. Root cause still to be identified, but some coverage is better than no coverage!
  • dropped log level to INFO as TRACE was too heavy on my terminal. Would be nice to maybe have it as an input on a wf trigger for debugging purposes

@YOU54F YOU54F mentioned this pull request May 7, 2024
@YOU54F
Copy link
Member Author

YOU54F commented May 7, 2024

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 YOU54F closed this May 7, 2024
@YOU54F YOU54F reopened this May 7, 2024
@YOU54F
Copy link
Member Author

YOU54F commented May 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant