Skip to content

Commit

Permalink
Merge pull request #20 from jbboehr/coveralls
Browse files Browse the repository at this point in the history
Add coveralls to TravisCI configuration
  • Loading branch information
jbboehr committed Jan 12, 2016
2 parents 0283ffd + dcb2526 commit 1442a4e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.dirstamp
.libs
autom4te.cache
coverage.info
gmon*
*.a
*.la
Expand All @@ -15,6 +16,7 @@ nbproject
build
modules
test.php
test_coverage
tests/*.diff
tests/*.exp
tests/*.php
Expand Down
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,17 @@ php:
branches:
only:
- master
- php7
- travis

sudo: false

addons:
apt:
packages:
- lcov

before_install:
- travis_retry gem install coveralls-lcov
- travis_retry git submodule update --init --recursive
- travis_retry git clone git://github.com/jbboehr/libmustache.git libmustache
- cd libmustache
Expand All @@ -26,12 +32,20 @@ before_install:

install:
- phpize
- ./configure --enable-mustache --with-libmustache=$HOME/libmustache
- make
- ./configure --enable-mustache --with-libmustache=$HOME/libmustache CXXFLAGS="--coverage -fprofile-arcs -ftest-coverage" LDFLAGS="--coverage"
- make clean all

script:
- export NO_INTERACTION=1
- export REPORT_EXIT_STATUS=1
- export TEST_PHP_EXECUTABLE=`which php`
- lcov --directory . --zerocounters
- lcov --directory . --capture --initial --compat-libtool --output-file coverage.info
- php run-tests.php -d extension=mustache.so -d extension_dir=modules -n ./tests/*.phpt
- for i in `ls tests/*.out 2>/dev/null`; do echo "-- START ${i}"; cat $i; echo "-- END"; done
- lcov --no-checksum --directory . --capture --compat-libtool --output-file coverage.info
- lcov --remove coverage.info "/usr*" --remove coverage.info "*/libmustache/*" --remove coverage.info "*/.phpenv/*" --compat-libtool --output-file coverage.info

after_success:
- coveralls-lcov coverage.info

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](LICENSE.md)
[![Build Status](https://travis-ci.org/jbboehr/php-mustache.png?branch=master)](https://travis-ci.org/jbboehr/php-mustache)
[![Coverage Status](https://coveralls.io/repos/jbboehr/php-mustache/badge.svg?branch=travis&service=github)](https://coveralls.io/github/jbboehr/php-mustache?branch=travis)

C++ implementation of [Mustache](http://mustache.github.com/) as a PHP extension.

Expand Down
1 change: 1 addition & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ if test "$PHP_MUSTACHE" != "no"; then
PHP_SUBST(MUSTACHE_SHARED_LIBADD)
PHP_NEW_EXTENSION(mustache, $PHP_MUSTACHE_SOURCES, $ext_shared, , $PHP_MUSTACHE_FLAGS)
fi

0 comments on commit 1442a4e

Please sign in to comment.