Skip to content

Chore: CI CodeCov Pipeline Check #534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
36 changes: 30 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
coverage: pcov
extensions: json, mbstring, xdebug
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -55,11 +55,35 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-interaction

- name: Analyze & test
run: composer test -- -v --coverage-clover=coverage.xml
- name: PHPUnit tests with coverage
run: vendor/bin/phpunit

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

- name: Run codecov
uses: codecov/codecov-action@v1
phpunit-coverage-check:
name: PHPUnit Coverage Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP 8.4
uses: shivammathur/setup-php@master
with:
php-version: 8.4
extensions: mbstring
coverage: xdebug, pcov
tools: composer:v2

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run tests
run: ./vendor/bin/phpunit --coverage-clover clover.xml

- name: Coverage Check
uses: docker://ghcr.io/ericsizemore/phpunit-coverage-check-action
with:
clover_file: 'clover.xml'
threshold: 80
36 changes: 30 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, mbstring
coverage: pcov
extensions: json, mbstring, xdebug
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -57,11 +57,35 @@ jobs:
- name: Install dependencies
run: composer update --prefer-dist --no-interaction

- name: Analyze & test
run: composer test -- -v --coverage-clover=coverage.xml
- name: Run Tests
run: vendor/bin/phpunit

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

- name: Run codecov
uses: codecov/codecov-action@v1
phpunit-coverage-check:
name: PHPUnit Coverage Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP 8.4
uses: shivammathur/setup-php@master
with:
php-version: 8.4
extensions: mbstring
coverage: xdebug, pcov
tools: composer:v2

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run tests
run: ./vendor/bin/phpunit --coverage-clover clover.xml

- name: Coverage Check
uses: docker://ghcr.io/ericsizemore/phpunit-coverage-check-action
with:
clover_file: 'clover.xml'
threshold: 80
16 changes: 8 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
convertWarningsToExceptions="true"
stopOnFailure="false"
>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<report>
<html outputDirectory="coverage"/>
</report>
</coverage>
<!-- <coverage processUncoveredFiles="true">-->
<!-- <include>-->
<!-- <directory suffix=".php">src</directory>-->
<!-- </include>-->
<!-- <report>-->
<!-- <html outputDirectory="coverage"/>-->
<!-- </report>-->
<!-- </coverage>-->
<testsuites>
<testsuite name="default">
<directory>test</directory>
Expand Down
Loading