Skip to content

Commit

Permalink
Merge pull request #3 from hobbii/maintenance/coveralls
Browse files Browse the repository at this point in the history
Replace Codecov with Coveralls
  • Loading branch information
MFlor committed Jun 24, 2022
2 parents d837f09 + 84c9dba commit 0ec3e42
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: php-cs-fixer, phpstan, composer:v2

- name: Run PHP CS Fixer
run: php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --dry-run --diff
tools: composer:v2

- name: Install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --prefer-dist

- name: Run PHP CS Fixer
run: vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --allow-risky=yes --dry-run --diff

- name: Run PHPStan
run: phpstan analyse
run: vendor/bin/phpstan analyse

tests:
needs: analysis
Expand All @@ -52,14 +52,12 @@ jobs:

- name: Execute tests via PHPUnit with coverage
if: ${{ matrix.php-version == '8.1' }}
run: vendor/bin/phpunit -d memory_limit=512M --coverage-clover clover.xml
run: vendor/bin/phpunit -d memory_limit=512M --coverage-clover build/logs/clover.xml

- name: Upload Coverage Report to Codecov.io
- name: Upload coverage results to Coveralls
if: ${{ matrix.php-version == '8.1' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
shell: bash
run: bash <(curl -s https://codecov.io/bash) -t ${CODECOV_TOKEN} -f ${GITHUB_WORKSPACE}/clover.xml -C ${GITHUB_SHA}



COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cognito Client
[![codecov](https://codecov.io/gh/hobbii/cognito-client/branch/main/graph/badge.svg?token=6PFWRSU1CN)](https://codecov.io/gh/hobbii/cognito-client)
[![Coverage Status](https://coveralls.io/repos/github/hobbii/cognito-client/badge.svg?branch=main)](https://coveralls.io/github/hobbii/cognito-client?branch=main)
[![Total Downloads](https://img.shields.io/packagist/dt/hobbii/cognito-client)](https://packagist.org/packages/hobbii/cognito-client)
[![Latest Version](https://img.shields.io/packagist/v/hobbii/cognito-client)](https://packagist.org/packages/hobbii/cognito-client)
![CI Workflow](https://github.com/hobbii/cognito-client/actions/workflows/ci.yml/badge.svg?branch=main)
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"phpunit/phpunit": "^7.5|^8.5|^9.5",
"phpstan/phpstan": "^1.0",
"mockery/mockery": "^1.3",
"fakerphp/faker": "^1.19"
"fakerphp/faker": "^1.19",
"friendsofphp/php-cs-fixer": "^3.2|^3.3|^3.4|^3.5|^3.6|^3.7|^3.8"
},
"license": "MIT",
"autoload": {
Expand Down

0 comments on commit 0ec3e42

Please sign in to comment.