yalp/lametric-build

语言: Go

git: https://github.com/yalp/lametric-build

Travis和Coveralls的LaMetric应用程序
A LaMetric app for Travis and Coveralls
README.md (中文)

适用于Travis和Coveralls状态的LaMetric应用程序

screencast

LaMetric设置

转到LaMetric开发人员站点

并创建一个3屏幕的应用程序: - 第一个是Travis构建状态的简单“名称”屏幕 - 第二个是覆盖率报告的“目标”屏幕 - 第三个是覆盖范围变更指标的简单“名称”

将应用程序设置为使用推送模式。

将您的应用发布为私人应用

保留URL和访问令牌的副本。

Webhooks设置

该应用程序希望特拉维斯和工作服打电话通过 他们各自的webhooks。 每项服务都必须以特定路径为目标。

特拉维斯CI

对于Travis CI,将URL添加到服务:

notifications:
    webhooks: http://server:port/travis

要么

notifications:
    webhooks:
      - http://other/server
      - http://server:port/travis

不要忘记将/ travis路径附加到URL的末尾。

工作服

对于Coveralls,将webhook url添加到通知部分。

不要忘记将/ coversalls路径附加到URL的末尾。

建立

这需要go工具链:

go get github.com/yalp/lametric-build

运行

要正常运行,该服务需要一些环境变量: - PORT:要使用的端口 - LAMETRIC_URL:LaMetric私有应用的URL - LAMETRIC_TOKEN:您的LaMetric私有应用程序的令牌

例:

PORT=8082 LAMETRIC_URL="http://localhost:9090" LAMETRIC_TOKEN="ABCD" ./lametric-build

许可证

公共区域。 如果你的房子烧伤,我也不负责任。

ALL

  • 添加配置文件
  • 使Travis或Coveralls服务可选
  • 支持更多封面和构建服务
  • 使一些屏幕可选

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

LaMetric app for Travis and Coveralls status

screencast

LaMetric setup

Go to the LaMetric Developper site

And create an app with 3 screens:
- the first is a simple "Name" screen for the Travis build status
- the second is a "Goal" screen for the coverage report
- the third is a simple "Name" for the coverage change metric

Set the app to use Push mode.

Publish you app as a private app

Keep a copy of the URL and Access Token.

Webhooks setup

The app expect Travis and Coverals to calls though
their respective webhooks.
Each service must target a specific path.

Travis CI

For Travis CI, add the url to service with:

notifications:
    webhooks: http://server:port/travis

or

notifications:
    webhooks:
      - http://other/server
      - http://server:port/travis

Don't forget to append the /travis path to the end the URL.

Coveralls

For Coveralls, add the webhook url to the notifications section.

Don't forget to append the /coversalls path to the end of the URL.

Build

This requires the go toolchain:

go get github.com/yalp/lametric-build

Running

To run properly, the service requires some env vars:
- PORT: port to use
- LAMETRIC_URL: URL to your LaMetric private app
- LAMETRIC_TOKEN: Token for your LaMetric private app

Example:

PORT=8082 LAMETRIC_URL="http://localhost:9090" LAMETRIC_TOKEN="ABCD" ./lametric-build

Licence

Public domain.
I'm not responsible if your house burns, nor anything else.

TODO

  • Add configuration file
  • Make Travis or Coveralls services optional
  • Support more cover and build services
  • Make some screens optional