ci: report test coverage to Codecov - #672
Open
refaim wants to merge 1 commit into
Open
Conversation
The suite runs on six native cells but nothing measured what it actually covers. Collect a profile on one cell per OS and hand it to Codecov, which merges the three uploads for a commit on its side. One cell per OS, not all six: which files compile is gated by GOOS alone — the tree has no GOARCH-gated Go files — so the arm64 twins would spend an instrumented build to report the same lines. The profile uses -coverpkg so hits count across package boundaries; without it a project that keeps most of its tests in cmd/f4 reports every other package as nearly untested. Nothing here can fail a build: uploads are best-effort, and both Codecov status checks are informational, so the numbers report without gating.
Owner
|
Хорошее! Займусь с компа попозже или завтра |
Owner
|
Напомни, плз, что мне нужно настроить, чтобы дать доступ к настройкам безопасности тебе? |
Collaborator
Author
|
Сейчас не получится, это твой личный репозиторий, только у тебя есть доступ. Можно создать организацию на гитхабе (как FarGroup) и туда проект перенести, тогда ты как владелец сможешь в нее добавлять людей и нарезать им разные уровни доступа, в том числе к настройкам безопасности. |
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.
Добавил сбор покрытия тестами и отправку в Codecov.
Что в PR:
-coverpkg=./...и отправляют его в Codecov — три отчёта он склеивает сам;.github/codecov.yml: оба статус-чекаinformational, то есть покрытие ничего не блокирует;Одна ячейка на ОС, а не все шесть: набор компилируемых файлов гейтится по GOOS, файлов, зависящих от GOARCH, в дереве нет — arm64-близнецы дали бы ровно те же строки. Цена — примерно минута на ячейку.
@unxed, чтобы заработало, нужно четыре шага с твоей стороны:
unxed/f4(поставится Codecov App);CODECOV_TOKEN.Что получится:
codecov/projectиcodecov/patch, оба informational, мерж не блокируют;Одна оговорка: PR из форков секретов не видят, поэтому на них заливка не сработает и комментария не будет — цифры будут обновляться на пушах в main. Если захочется и на форковых PR, в настройках организации Codecov есть разрешение на заливку без токена для публичных репозиториев.
Пока токена нет, всё безопасно: заливка отваливается с
Token required, шаг остаётся зелёным, CI не краснеет. Проверено на форке: https://github.com/refaim/f4/actions/runs/32566460922