ci: migrate CI to GitHub Actions - #39
Open
fohte wants to merge 6 commits into
Open
Conversation
intent(cmd/subee): unblock running `go test` under current Go toolchains as part of the CircleCI to GitHub Actions migration learned(cmd/subee): golang.org/x/tools v0.0.0-20191017035025-0abb09c987dd panics with "internal error: package ... without types was imported from ..." under Go 1.26 because go/packages' loader protocol changed since that pre-modules-era release
intent(ci): restore a working CI so PRs get tested again — the CircleCI config had been broken since the `circleci/golang` Docker Hub images it depends on were removed, leaving the README badge permanently red decision(ci): matrix over every Go module directory instead of a single `go test ./...`, since this is a multi-module repo and the root command never reached the nested modules decision(ci): start the Pub/Sub emulator with a plain `docker run` and poll the port, since GitHub Actions' `services:` cannot override an image's command and the emulator image needs one to actually start rejected(ci): porting the CLI release job (go-crossbuild/github-release/ homebrew) and the codecov upload — out of scope, library releases only need a tag push and neither had a working badge or was requested
intent(engine_test): let `go test -race` pass reliably now that CI actually runs it again learned(engine_test): handleMessage runs each consumed message/batch in its own goroutine by design, so the consumer callbacks in these tests can run concurrently; TestEngine masked this by sleeping 6ms between messages, but TestEngineWithBatchConsumer's tighter timing let two callback invocations race on `cur` and the `resultCh` close, which -race reliably caught
intent(ci): match the removed CircleCI config's verbosity and make e2e failures debuggable from the Actions log alone decision(ci): keep the Pub/Sub emulator container running (drop --rm) and dump its logs only `if: failure()`, since the runner is ephemeral anyway so there's nothing to clean up
intent(cmd/subee): fix TestSubscriberGenerator failing in CI, where it passed locally learned(cmd/subee): generated files never wrote the "github.com/wantedly/subee" import themselves, relying on imports.Process (goimports) to guess and add it; that guess scans the machine's real $GOMODCACHE regardless of the test's own isolated packages.Config.Env, so it silently succeeds only on machines that happen to have the module cached already — CI's clean cache always misses it decision(cmd/subee): add the import unconditionally and let imports.Process prune it when actually unused, instead of relying on it to add imports it can't reliably resolve
learned(cmd/subee): the comment's own example (an adapter-less consumer using subee.Message) was a case that DOES reference subee, not one that doesn't — the file that actually lacks the reference is the with-adapter consumer interface, which only deals with the concrete message type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
What