Skip to content

Commit d1618e7

Browse files
committed
coverage test
1 parent 38beb78 commit d1618e7

4 files changed

Lines changed: 12 additions & 26 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,21 @@ jobs:
4949
with:
5050
php-version: ${{ matrix.php }}
5151
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
52-
coverage: none
52+
coverage: ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable' && 'xdebug' || 'none' }}
5353

5454
- name: Install dependencies
5555
run: |
5656
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
5757
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5858
5959
- name: Execute tests
60-
run: vendor/bin/phpunit
60+
run: |
61+
vendor/bin/phpunit ${{ startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable' && '--coverage-clover=clover.xml' || '' }}
62+
63+
- name: Make code coverage badge
64+
if: startsWith(github.event.head_commit.message, 'coverage') && matrix.php == '8.4' && matrix.laravel == '13.*' && matrix.stability == 'prefer-stable'
65+
uses: timkrase/phpunit-coverage-badge@v1.2.1
66+
with:
67+
coverage_badge_path: .github/coverage.svg
68+
push_badge: true
69+
repo_token: ${{ secrets.GITHUB_TOKEN }}

.scrutinizer.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.styleci.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Latest Version on Packagist](https://img.shields.io/packagist/v/javaabu/passport.svg?style=flat-square)](https://packagist.org/packages/javaabu/passport)
44
[![Test Status](../../actions/workflows/run-tests.yml/badge.svg)](../../actions/workflows/run-tests.yml)
5-
[![Quality Score](https://img.shields.io/scrutinizer/g/javaabu/passport.svg?style=flat-square)](https://scrutinizer-ci.com/g/javaabu/passport)
5+
![Code Coverage Badge](./.github/coverage.svg)
66
[![Total Downloads](https://img.shields.io/packagist/dt/javaabu/passport.svg?style=flat-square)](https://packagist.org/packages/javaabu/passport)
77

88
laravel/passport with modifications

0 commit comments

Comments
 (0)