Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub 上でカバレッジを確認できるようにする #72

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

negokaz
Copy link
Contributor

@negokaz negokaz commented Oct 19, 2021

https://coveralls.io/ というサービスを使う

@@ -1,5 +1,7 @@
# lerna-app-library

[![Coverage Status](https://coveralls.io/repos/github/lerna-stack/lerna-app-library/badge.svg?branch=main)](https://coveralls.io/github/lerna-stack/lerna-app-library?branch=main)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

結果を見る限り、命令網羅(C0)しか取得できていないように見える。

image
https://coveralls.io/github/lerna-stack/lerna-app-library

設定で、branch coverage の機能は有効化されている。

image
https://coveralls.io/github/lerna-stack/lerna-app-library/settings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coveralls の API ドキュメントを確認すると、coverage という(行ごとのカバレッジを表現する?)フィールドの他に branches という(分岐のカバレッジを表現する?)フィールドがある模様。coverage は必須のフィールドだが、branches はオプショナルなフィールドとして定義されている。

OBJECTS: SOURCE FILE

API Reference | Coveralls Docs

しかし、sbt-coveralls の実装を確認すると coverage フィールドしか設定されていないように見える。

    gen.writeFieldName("coverage")
    gen.writeStartArray()
    report.lineCoverage.foreach {
      case Some(x) => gen.writeNumber(x)
      case _ => gen.writeNull()
    }

sbt-coveralls/CoverallPayloadWriter.scala at v1.3.1 · scoverage/sbt-coveralls

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

別のプロジェクトだが、分岐網羅のステータスが確認できているプロジェクトがあった。

sbt-coveralls が brances をサポートすると、lerna-app-library においても同様の表示ができるようになることが期待できる。

image


image

https://coveralls.io/builds/40221430

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants