Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
php-version: ${{ matrix.php-version }}
tools: composer
extensions: json, mbstring, xml
coverage: none
coverage: xdebug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -64,6 +64,16 @@ jobs:
fi

- name: Test with PHPUnit
run: composer test
run: vendor/bin/phpunit --coverage-text
env:
TERM: xterm-256color

- if: matrix.php-version == '8.3'
name: Run Coveralls
continue-on-error: true
run: |
composer global require php-coveralls/php-coveralls
~/.composer/vendor/bin/php-coveralls --verbose --coverage_clover=build/phpunit/clover.xml --json_path build/phpunit/coveralls-upload.json
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-version }}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CodeIgniter SSE

[![PHPUnit](https://github.com/maniaba/codeigniter4-sse/actions/workflows/phpunit.yml/badge.svg)](https://github.com/maniaba/codeigniter4-sse/actions/workflows/phpunit.yml)
[![PHPStan](https://github.com/maniaba/codeigniter4-sse/actions/workflows/phpstan.yml/badge.svg)](https://github.com/maniaba/codeigniter4-sse/actions/workflows/phpstan.yml)
[![Docs](https://github.com/maniaba/codeigniter4-sse/actions/workflows/docs.yml/badge.svg)](https://github.com/maniaba/codeigniter4-sse/actions/workflows/docs.yml)
[![Coverage Status](https://coveralls.io/repos/github/maniaba/codeigniter4-sse/badge.svg?branch=develop)](https://coveralls.io/github/maniaba/codeigniter4-sse?branch=develop)

[![PHP](https://img.shields.io/badge/PHP-8.2%2B-777BB4.svg)](https://www.php.net/)
[![CodeIgniter](https://img.shields.io/badge/CodeIgniter-4.7%2B-DD4814.svg)](https://codeigniter.com/)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.md)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"rector": "rector process --dry-run",
"rector-fix": "rector process",
"style": "@cs-fix",
"test": "phpunit --configuration=phpunit.xml.dist",
"test": "phpunit --configuration=phpunit.xml.dist --no-coverage",
"test-browser": "node --test tests/Browser/*.test.mjs"
},
"config": {
Expand Down
11 changes: 11 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
executionOrder="random"
failOnRisky="true"
failOnWarning="true">
<coverage includeUncoveredFiles="true">
<report>
<clover outputFile="build/phpunit/clover.xml"/>
<html outputDirectory="build/phpunit/html"/>
<php outputFile="build/phpunit/coverage.serialized"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
<xml outputDirectory="build/phpunit/xml-coverage"/>
</report>
</coverage>
<testsuites>
<testsuite name="CodeIgniter SSE">
<directory>tests</directory>
Expand All @@ -20,6 +29,8 @@
</include>
</source>
<php>
<env name="XDEBUG_MODE" value="coverage"/>
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
<server name="app.baseURL" value="https://example.com/"/>
<const name="HOMEPATH" value="./"/>
<const name="CONFIGPATH" value="vendor/codeigniter4/framework/app/Config/"/>
Expand Down
Loading