Skip to content

About

erlang.mk plugin for generating and sending coverage reports to Coveralls.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coveralls.mk

An Erlang.mk plugin that collects cover data and uploads it to coveralls.io.

Requires OTP 27+ (stdlib json).

Usage

Add the plugin to your Makefile:

DEP_PLUGINS = coveralls.mk
dep_coveralls.mk = git https://github.com/erlangbureau/coveralls.mk master

COVER = 1

include erlang.mk

If you also use ci.erlang.mk, skip loading this plugin when CI_ERLANG_MK is set so make ci-list stdout stays clean (DEP/PATCH lines otherwise pollute the OTP matrix):

ifndef CI_ERLANG_MK
DEP_PLUGINS = coveralls.mk
dep_coveralls.mk = git https://github.com/erlangbureau/coveralls.mk master
endif

Run tests with coverage, then upload:

make tests
make coveralls-send

Or in one step:

make coveralls

GitHub Actions

- name: Run tests with coverage
  run: make tests

- name: Upload coverage to Coveralls
  env:
    # Preferred: token from https://coveralls.io (Repo Token)
    COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
    # Fallback / GitHub App flows
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  run: make coveralls-send

Variables

Variable Default Meaning
COVERALLS_REPO_TOKEN $(GITHUB_TOKEN) Coveralls repo token
COVERALLS_SERVICE_NAME github CI service name
COVERALLS_SERVICE_JOB_ID $(GITHUB_RUN_ID) Job id
COVERALLS_SERVICE_NUMBER $(GITHUB_RUN_NUMBER) Build number
COVERALLS_COMMIT_SHA $(GITHUB_SHA) / git rev-parse HEAD Commit
COVERALLS_BRANCH $(GITHUB_HEAD_REF) / $(GITHUB_REF_NAME) Branch
COVERALLS_PULL_REQUEST parsed from $(GITHUB_REF) PR number
COVERALLS_JSON logs/coveralls.json Local JSON path
COVERALLS_URL https://coveralls.io/api/v1/jobs Upload URL

About

erlang.mk plugin for generating and sending coverage reports to Coveralls.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages