ci: migrate CI from Travis to GitHub Actions and add a Go workflow set
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 15/100
調査の方向性
Start with .travis.yml, go.mod, and go.work, then review the referenced workflows in backblaze-labs/b2-mcp and related issues #92–#95. Run the existing Go checks to confirm the reported vet failures and package coverage gaps. Done means Travis is replaced, the requested workflows and repository settings are in place, and the CI and live workflow meet the stated acceptance criteria.
索引モデルが issue の本文から書いたものです。
説明
Migrate blazer's CI to GitHub Actions and build out a Go-appropriate workflow set. Today the only CI config is .travis.yml, which targets go: tip on master only, runs go run internal/bin/cleanup/cleanup.go as a before_script, then go test -v ./base ./b2 ./x/... and go vet -v ./base ./b2 ./x/.... Travis no longer runs for this repository and there is no .github/ directory, so nothing is verified automatically (the only PR checks are Snyk). go vet ./... currently fails on master at x/consistent/consistent_test.go:156 and :161 (Fatalf from a non-test goroutine), and the internal/, bin/b2keys and examples/ packages are never built or tested by CI.
The workflow set below is modelled on backblaze-labs/b2-mcp/.github/workflows (test.yml, codeql.yml, contract.yml, smoke.yml, mutation.yml, docs.yml, publish.yml, release-tag.yml, quality-keeper.yml), keeping what makes sense for a Go library and dropping the npm, container and MCP specifics. It can land as one PR or several, but the first PR must replace .travis.yml.
Workflows to add:
ci.yml(push to the default branch andpull_request):go build ./...,go vet ./...,gofmt -l .must be empty,go mod tidy -diff,go mod verify, and a lint job (golangci-lint or staticcheck). A test job withgo test -race -shuffle=on -coverprofileover./...on a matrix of Go versions (thegodirective ingo.modplus the latest stable) and operating systems (ubuntu, macos, windows), with coverage uploaded as an artifact or summary. A job that builds and tests thebin/b2keysworkspace module explicitly, since it is a separate module ingo.work. A cross-compile smoke job (GOOS/GOARCHincludinglinux/386andlinux/arm) to catch 32-bit issues such as theintsize truncation inbase. Fix the two existinggo vetfailures in the same PR so the job is green on day one.- A
conformance-summary(or equivalent) aggregate job that depends on all required jobs, so branch protection needs a single required check, as in b2-mcp. securityjobs:govulncheck ./...on every PR plus a weekly schedule (new advisories land against unchanged code), CodeQL for Go (codeql.ymlwith push, PR and weekly cron), andzizmorfor the workflows themselves (tracked in #93; add the job here or immediately after).test-live.yml(the b2-mcpcontract.ymlandsmoke.ymlequivalents): runs the credentialed integration suites inb2/integration_test.goandbase/integration_test.go, which readB2_ACCOUNT_IDandB2_ACCOUNT_KEY(align the names with the cross-repo standardB2_APPLICATION_KEY_IDandB2_APPLICATION_KEYwhile doing this, and addB2_MASTER_KEY_IDandB2_MASTER_KEYonly if a test needs them). Triggered byworkflow_dispatch, a nightly or weeklyschedule, andworkflow_callso a release workflow can require it. Runs in a protected GitHub environment holding the secrets, never onpull_requestfrom forks, with a guard job that fails closed when secrets are missing. It must runinternal/bin/cleanup/cleanup.gobefore and after (the currentbefore_script) so leaked<account>-b2-tests-*buckets do not accumulate, and use a concurrency group so two runs never share an account at once.fuzz.yml(optional, weekly or nightly): shortgo test -fuzzruns for any fuzz targets, such as the file nameescape/unescapefunctions inbase/strings.go, with failing inputs committed totestdata/fuzz.bench.yml(optional, advisory):go test -benchwithbenchstatagainst the base branch, never blocking.mutation.yml(optional, advisory, weekly): a Go mutation testing tool such asgremlinsonbaseandb2, reporting only, mirroring the advisory mutation workflow in b2-mcp.docs.yml(optional):go docand example compile checks on PRs; pkg.go.dev renders documentation automatically, so no deploy job is needed.release.yml(tag-triggeredv*) and arelease-tagrequest workflow: verify the tag matchesCHANGELOG.md, is reachable from a green default-branch commit, runs the full gate plus the live test workflow as a pre-release gate, then creates the GitHub Release with notes taken from the changelog. Details are in theRELEASE.mdissue (#94). Do not publish from a workstation.dependabot.yml(or Renovate) forgomodandgithub-actionswith grouped updates and a weekly schedule, plusCODEOWNERSand a pull request template.
Hardening rules to apply to every workflow:
permissions: contents: readat the top, widening per job only where needed; pin third-party actions to full commit SHAs; useactions/setup-gowith its built-in module and build cache (no separateactions/cache); setpersist-credentials: falseon checkout; no secrets in logs.- Dependabot PRs must never run CI. Every workflow with a
pull_requesttrigger guards each job withif: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.user.login != 'dependabot[bot]' }}. Workflows without apull_requesttrigger (schedule, tag and dispatch only) need no guard. - Add a branch protection definition (as
branch-protection-main.jsondoes in b2-mcp) requiring the aggregate CI job, and use the new default branch name once #92 lands. A required check that is skipped can block merge, so make sure the aggregate job handles skipped jobs explicitly.
Acceptance: .travis.yml is deleted, ci.yml is green on the default branch and required by branch protection, go vet ./..., go test -race ./... and govulncheck ./... pass in CI, the live workflow has run successfully at least once from a protected environment and leaves no leaked buckets, and every workflow follows the hardening rules above.
Related: #93 (zizmor), #92 (rename master to main), #94 (RELEASE.md), #95 (SECURITY.md).
- 主要言語
- Go
- スター
- 66
- フォーク
- 18
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 132
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Backblaze/blazer のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Bucket.Attrs never returns ReplicationConfig: replication configuration is write-only再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
test: skip the fuzz non-vacuity guard when replaying a single seed対応中かも @ffumero2003 が 5 日前に担当しました。 オープンtesting
Backblaze/blazer#330 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
Backblaze/blazer の issue をすべて見る
似ている issue
-
needs-triage typo
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
メンテナーはふだん 1 日以内に返信
-
good first issue severity: low tech-debt
難易度 2/5 半日 初心者へのやさしさ 75/100
TMHSDigital/subenum#329 ·
メンテナーはふだん 1 日以内に返信
-
[Bug] Backend summarize min() / max() panics when a field has no numeric values対応中かも @weng5e が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
grafana/grafana-infinity-datasource#1832 ·
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GillMacedo/godebugdiff#13 ·