Skip to content

Commit

Permalink
use TravisCI to send code coverage (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz authored Oct 7, 2020
1 parent e284350 commit b856035
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_clover: tests/logs/clover.xml
json_path: tests/logs/coveralls-upload.json
service_name: travis-ci
5 changes: 0 additions & 5 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,3 @@ jobs:

- name: "running unit tests ( phpunit )"
run: "composer test:unit"

- name: "sending code coverage data to coveralls"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: "php vendor/bin/coveralls tests/logs/clover.xml"
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
dist: trusty
language: php
sudo: required
os:
- linux

jobs:
include:
- php: 7.4
fast_finish: true

cache:
directories:
- $HOME/.composer/cache/files

before_install:
- git clone -b stable https://github.com/jedisct1/libsodium.git
- cd libsodium && sudo ./configure && sudo make check && sudo make install && cd ..

install:
- pecl channel-update pecl.php.net
- pecl install libsodium
- composer install

script:
- composer test:unit

after_script:
- composer code:coverage
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Psl - PHP Standard Library

![unit tests status](https://github.com/azjezz/psl/workflows/unit%20tests/badge.svg?branch=develop)
![static analysis status](https://github.com/azjezz/psl/workflows/static%20analysis/badge.svg?branch=develop)
![security analysis status](https://github.com/azjezz/psl/workflows/security%20analysis/badge.svg?branch=develop)
![coding standards status](https://github.com/azjezz/psl/workflows/coding%20standards/badge.svg?branch=develop)
![Unit tests status](https://github.com/azjezz/psl/workflows/unit%20tests/badge.svg?branch=develop)
![Static analysis status](https://github.com/azjezz/psl/workflows/static%20analysis/badge.svg?branch=develop)
![Security analysis status](https://github.com/azjezz/psl/workflows/security%20analysis/badge.svg?branch=develop)
![Coding standards status](https://github.com/azjezz/psl/workflows/coding%20standards/badge.svg?branch=develop)
[![TravisCI Build Status](https://travis-ci.com/azjezz/psl.svg?branch=develop)](https://travis-ci.com/azjezz/psl)
[![Scrutinizer Build Status](https://scrutinizer-ci.com/g/azjezz/psl/badges/build.png?b=develop)](https://scrutinizer-ci.com/g/azjezz/psl/build-status/develop)
[![Coverage Status](https://coveralls.io/repos/github/azjezz/psl/badge.svg?branch=develop)](https://coveralls.io/github/azjezz/psl?branch=develop)
[![Type Coverage](https://shepherd.dev/github/azjezz/psl/coverage.svg)](https://shepherd.dev/github/azjezz/psl)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require-dev": {
"vimeo/psalm": "dev-master",
"phpunit/phpunit": "^9.0",
"cedx/coveralls": "dev-main",
"php-coveralls/php-coveralls": "^2.2",
"roave/security-advisories": "dev-master",
"squizlabs/php_codesniffer": "^3.5"
},
Expand All @@ -42,7 +42,7 @@
"type:check": "psalm",
"type:coverage": "psalm --shepherd",
"test:unit": "phpunit",
"code:coverage": "coveralls tests/logs/clover.xml",
"code:coverage": "php-coveralls -v",
"security:analysis": "psalm --taint-analysis",
"check": [
"@cs:check",
Expand Down

0 comments on commit b856035

Please sign in to comment.