Skip to content

Commit

Permalink
Run coveralls on github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
srmklive committed Sep 4, 2020
1 parent 797aa79 commit eaed0c1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .coveralls.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service_name: travis-ci
service_name: github-ci
28 changes: 25 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Tests
on: [push, pull_request]
jobs:
predis:
paypal:
name: PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -29,7 +29,29 @@ jobs:
env:
PHP_VERSION: ${{ matrix.php-versions }}
run: composer install --no-progress --prefer-dist --optimize-autoloader $(if [ "$PHP_VERSION" == "8.0" ]; then echo "--ignore-platform-reqs"; fi;)
- name: Test with PHPUnit
- name: Run tests with code coverage
env:
PHP_VERSION: ${{ matrix.php-versions }}
run: vendor/bin/phpunit $(if [ "$PHP_VERSION" == "7.1" ] || [ "$PHP_VERSION" == "7.2" ]; then echo "-c phpunit.xml.legacy"; fi;)
run: vendor/bin/phpunit $(if [ "$PHP_VERSION" == "7.0" ] || [ "$PHP_VERSION" == "7.1" ] || [ "$PHP_VERSION" == "7.2" ]; then echo "-c phpunit.xml.legacy"; fi;) --coverage-clover build/logs/clover.xml
- name: Install PHP Coveralls library
env:
PHP_VERSION: ${{ matrix.php-versions }}
run:
composer global require --dev twinh/php-coveralls
- name: Upload coverage results to Coveralls
env:
PHP_VERSION: ${{ matrix.php-versions }}
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: php-${{ matrix.php-versions }}
run:
php-coveralls -v
coveralls-finish:
needs: [paypal]
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
File renamed without changes.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Latest Version on Packagist](https://img.shields.io/packagist/v/srmklive/paypal.svg?style=flat-square)](https://packagist.org/packages/srmklive/paypal)
[![Total Downloads](https://img.shields.io/packagist/dt/srmklive/paypal.svg?style=flat-square)](https://packagist.org/packages/srmklive/paypal)
[![StyleCI](https://github.styleci.io/repos/43671533/shield?branch=v2.0)](https://github.styleci.io/repos/43671533?branch=v2.0)
[![Build Status](https://travis-ci.org/srmklive/laravel-paypal.svg?branch=v2.0)](https://travis-ci.org/srmklive/laravel-paypal)
![Tests](https://github.com/srmklive/laravel-paypal/workflows/Tests/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/srmklive/laravel-paypal/badge.svg?branch=v2.0)](https://coveralls.io/github/srmklive/laravel-paypal?branch=v2.0)
[![Code Quality](https://scrutinizer-ci.com/g/srmklive/laravel-paypal/badges/quality-score.png?b=v2.0)](https://scrutinizer-ci.com/g/srmklive/laravel-paypal/?branch=v2.0)
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"nesbot/carbon": "~1.0|~2.0"
},
"require-dev": {
"php-coveralls/php-coveralls": "^2.2",
"phpunit/phpunit": "^5.7|^6.0|^7.0|^8.0|^9.0"
},
"config": {
Expand Down

0 comments on commit eaed0c1

Please sign in to comment.