Skip to content

Commit a9efcbe

Browse files
Add coverage and update Travis config
1 parent e281519 commit a9efcbe

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ SETTLE_MERCHANT_ID=
22
SETTLE_USER_ID=
33
SETTLE_PUBLIC_KEY=
44
SETTLE_PRIVATE_KEY=
5-
SETTLE_IN_SANDBOX=
5+
SETTLE_IN_SANDBOX=
6+
COVERALLS_RUN_LOCALLY=1
7+
COVERALLS_REPO_TOKEN=

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
vendor
33
.phpunit.result.cache
44
composer.lock
5-
coverage
65
.env

.travis.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ cache:
88
directories:
99
- $HOME/.composer/cache
1010

11-
before_install:
12-
- travis_retry composer self-update
13-
14-
1511
install:
16-
- travis_retry composer install --no-interaction
12+
- composer install --no-interaction
1713

1814
script:
1915
- vendor/bin/pest
2016

2117
after_success:
22-
- travis_retry composer require php-coveralls/php-coveralls
23-
- travis_retry vendor/bin/php-coveralls --coverage_clover=coverage/logs/clover.xml --json_path=coverage/logs/coveralls-upload.json -v
18+
- vendor/bin/php-coveralls --coverage_clover=coverage/logs/clover.xml --json_path=coverage/logs/coveralls-upload.json -v

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![License](https://img.shields.io/badge/license-Apache%202-brightgreen.svg)](https://github.com/daniel-zahariev/music-codes/blob/master/COPYING)
22
[![Build Status](https://api.travis-ci.com/daniel-zahariev/settle-sdk-php.svg?branch=main)](https://app.travis-ci.com/github/daniel-zahariev/settle-sdk-php)
3+
[![Coverage Status](https://coveralls.io/repos/github/daniel-zahariev/settle-sdk-php/badge.svg?branch=main)](https://coveralls.io/github/daniel-zahariev/settle-sdk-php?branch=main)
34

45
# PHP SDK for connecting to the Settle Payment Platform
56

composer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"require-dev": {
2020
"pestphp/pest": "^1.20",
21+
"php-coveralls/php-coveralls": "^2.4",
2122
"vlucas/phpdotenv": "^5.3"
2223
},
2324
"autoload": {
@@ -26,6 +27,7 @@
2627
}
2728
},
2829
"scripts": {
29-
"test": "pest"
30+
"test": "set -a; source .env; pest",
31+
"coverage": "set -a; source .env; php-coveralls --coverage_clover=coverage/logs/clover.xml --json_path=coverage/logs/coveralls-upload.json -v"
3032
}
3133
}

0 commit comments

Comments
 (0)