ci: add go test, go vet, and staticcheck gates to the build-verify workflow
Mantenedores costumam responder em até 1 dia
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 74/100
- Tipo de issue
- Funcionalidade
- Clareza
- Claramente especificada
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- github-actions, go
- Domínio
- build-system, ci-cd, testing
Direção de pesquisa
Comece com .github/workflows/build-verify.yml e a etapa existente Build Go packages; depois inspecione Makefile e execute localmente as verificações Go propostas. Considera-se concluído quando o workflow executa go test ./..., go vet ./... e staticcheck em pushes e pull requests, com targets make test e make vet correspondentes e todos os testes existentes passando.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Reason/Context
The current build-verify.yml CI workflow only compiles binaries — it never runs tests, go vet, or any static analysis. This means bugs ship silently and contributors get no automated feedback on correctness.
Proof from the current open PR queue — every one of these bugs existed in master and CI never caught them:
req.Bodyread instead ofresp.BodyinDownloadArtifact→ PR #338 (go vetcatches this)panic(err.Error())in connector code → PR #341, #319 (staticcheckcatches this)TestDeleteContextfails on every clean checkout → PR #334 (go test ./...catches this)- OAuth2 tokens printed unconditionally to stderr → PR #345 (caught by tests with log capture)
- String-concatenation JSON injection risk → PR #341 (
staticcheckcatches this)
The motivation: CI should be the first line of defence. Right now it is not.
Description
Add three mandatory quality gates to build-verify.yml that run on every PR and push:
go test ./...— runs the existing unit test suite (currently never executed in CI)go vet ./...— Go's built-in analyser, catches real bugs like wrong body reads, bad panic arguments, printf mismatchesstaticcheck— industry-standard linter, zero config, no false positives
Also add make test and make vet targets to Makefile so contributors can run the same checks locally before pushing.
This is not a breaking change — it only adds new CI steps. If existing tests are currently failing on master,
those failures will need to be fixed as part of this PR.
Implementation ideas
Add before the existing Build Go packages step in .github/workflows/build-verify.yml:
- name: Run unit tests
run: go test ./...
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/staticcheck-action@v1
with:
version: latest
install-go: false
`staticcheck` is preferred over `golangci-lint` — zero config, no false positives, directly catches the bug classes above.
Add to `Makefile`:
```makefile
.PHONY: test
test:
go test ./...
.PHONY: vet
vet:
go vet ./...
- Linguagem predominante
- Go
- Estrelas
- 59
- Forks
- 74
- Merge médio
- 5d 17h
- PRs com merge (30d)
- 22
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de microcks/microcks-cli
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
microcks/microcks-cli#601 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
microcks/microcks-cli#598 ·
Mantenedores costumam responder em até 1 dia
-
bug: microcks login ignores the --config flag and always modifies default configTalvez já em andamento @aryarathoree assumiu há 2 dias. Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
microcks/microcks-cli#594 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
-
Wrong link to test resultsTalvez já em andamento @SajanBisht assumiu há 12 dias. Abertacomponent/cli keep-open kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
microcks/microcks-cli#589 · 4 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Default configuration path falls back to the current directory when the home directory cannot be determinedTalvez já em andamento @Sarthak-Shreshtha01 assumiu há 16 dias. Abertacomponent/cli kind/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
microcks/microcks-cli#583 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de microcks/microcks-cli
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
cloudevents/sdk-go#1346 ·
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
kubernetes/cloud-provider-aws#1517 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
agent-butler-finding chore
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
jordansmall/spindrift#6221 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 3 dias