ci: migrate CI from Travis to GitHub Actions and add a Go workflow set
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Go
- Estrellas
- 66
- Forks
- 18
- Merge medio
- 1 d 10 h
- PR fusionados (30 d)
- 132
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Backblaze/blazer
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Bucket.Attrs never returns ReplicationConfig: replication configuration is write-onlyQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
test: skip the fuzz non-vacuity guard when replaying a single seedPosiblemente ocupada @ffumero2003 la tomó hace 5 días. Abiertotesting
Backblaze/blazer#330 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Backblaze/blazer
Issues similares
-
needs-triage typo
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
Los mantenedores suelen responder en 1 día
-
good first issue severity: low tech-debt
Dificultad 2/5 Medio día Aptitud para principiantes 75/100
TMHSDigital/subenum#329 ·
Los mantenedores suelen responder en 1 día
-
[Bug] Backend summarize min() / max() panics when a field has no numeric valuesPosiblemente ocupada @weng5e la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
grafana/grafana-infinity-datasource#1832 ·
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
GillMacedo/godebugdiff#13 ·