0-ali / example-vala

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codecov Vala Example

Build Status codecov

https://codecov.io @codecov hello@codecov.io

This repository serves as an example on how to use Codecov Global for Vala.

Usage

Since Vala translate to C, the usage same directives for C/C++ apply. The --ccode and --debug flags have to be specified so that the C coverage can be properly mapped to the original sources.

valac --debug --ccode hello.vala
gcc $(pkg-config --cflags --libs glib-2.0 gobject-2.0) -ftest-coverage -fprofile-arcs -o hello hello.c
./hello
gcov hello.vala

Meson

To enable coverage with Meson, specify the -D b_coverage=true project option.

mkdir build && cd build
meson -D b_coverage=true ..
ninja
ninja test

Travis CI

Add to your .travis.yml file.

after_success:
  - bash <(curl -s https://codecov.io/bash)

All other CI you can simply run bash <(curl -s https://codecov.io/bash).

Private Repos

Include your Codecov upload token found in the repository settings page on Codecov

after_success:
  - bash <(curl -s https://codecov.io/bash) -t repo-upload-token

View source and learn more about Codecov Global Uploader

About


Languages

Language:Vala 100.0%