Skip to content
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

Migrate tests to PestPHP #67

Merged
merged 4 commits into from
Nov 7, 2024
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
6 changes: 2 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
- name: Install dependencies
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit --testsuite=default
- name: Execute tests
run: vendor/bin/phpunit
run: vendor/bin/pest --testsuite=default

report-metrics:
runs-on: ubuntu-latest
Expand All @@ -60,7 +58,7 @@ jobs:
run: composer update --prefer-stable --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=reports/coverage/clover.xml
run: vendor/bin/pest --coverage-clover=reports/coverage/clover.xml

- name: Execute type coverage tests
run: vendor/bin/pest --type-coverage --type-coverage-json=reports/coverage/pest-types-coverage.json
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ This package would give "1 234,56 kr", while most other solutions probably would
[![License](https://poser.pugx.org/pelmered/filament-money-field/license)](https://packagist.org/packages/pelmered/filament-money-field)

[![Tests](https://github.com/pelmered/filament-money-field/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/pelmered/filament-money-field/actions/workflows/tests.yml)
[![Build Status](https://scrutinizer-ci.com/g/pelmered/filament-money-field/badges/build.png?b=main)](https://scrutinizer-ci.com/g/pelmered/filament-money-field/build-status/main)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pelmered/filament-money-field/badges/quality-score.png?b=main)](https://scrutinizer-ci.com/g/pelmered/filament-money-field/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/pelmered/filament-money-field/badges/coverage.png?b=main)](https://scrutinizer-ci.com/g/pelmered/filament-money-field/?branch=main)
[![OtterWise Coverage](https://img.shields.io/endpoint?url=https://otterwise.app/badge/github/pelmered/filament-money-field/coverage/25ef865e-5235-4775-a357-246bef38293c)](https://otterwise.app/github/pelmered/filament-money-field)
[![OtterWise Coverage](https://img.shields.io/endpoint?url=https://otterwise.app/badge/github/pelmered/filament-money-field/type/25ef865e-5235-4775-a357-246bef38293c)](https://otterwise.app/github/pelmered/filament-money-field)
[![OtterWise Coverage](https://img.shields.io/endpoint?url=https://otterwise.app/badge/github/pelmered/filament-money-field/complexity/25ef865e-5235-4775-a357-246bef38293c)](https://otterwise.app/github/pelmered/filament-money-field)
[![OtterWise Coverage](https://img.shields.io/endpoint?url=https://otterwise.app/badge/github/pelmered/filament-money-field/crap/25ef865e-5235-4775-a357-246bef38293c)](https://otterwise.app/github/pelmered/filament-money-field)

[![Tested on PHP 8.2 to 8.3](https://img.shields.io/badge/Tested%20on%20PHP-8.2%20|%208.3-brightgreen.svg?maxAge=2419200)](https://github.com/pelmered/filament-money-field/actions/workflows/tests.yml)
[![Tested on OS:es Linux, MacOS, Windows](https://img.shields.io/badge/Tested%20on%20lastest%20versions%20of-%20Ubuntu%20|%20MacOS%20|%20Windows-brightgreen.svg?maxAge=2419200)](https://github.com/pelmered/filament-money-field/actions/workflows/tests.yml)
Expand Down
29 changes: 18 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,19 @@
"require": {
"php": "^8.2",
"ext-intl": "*",
"filament/support": "^v3.2.21",
"filament/support": "^v3.2.39",
"moneyphp/money": "^4.0",
"illuminate/support": "^10.35 || ^11.0"
"illuminate/support": "^11.0"
},
"require-dev": {
"phpunit/phpunit": "^10.5 || ^11",
"filament/filament": "v3.2.21",
"orchestra/testbench": "^8.8 || ^9.0",
"phpstan/phpstan": "^1.10",
"nunomaduro/collision": "^7.6 || ^8.0",
"laravel/pint": "^1.15"
"filament/filament": "^3.2",
"orchestra/testbench": "^9.0",
"phpstan/phpstan": "^1.12.2",
"nunomaduro/collision": "^8.0",
"laravel/pint": "^1.16",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-drift": "^3.0",
"pestphp/pest-plugin-type-coverage": "^3.0"
},
"extra": {
"laravel": {
Expand All @@ -61,18 +63,23 @@
"@php vendor/bin/testbench serve"
],
"lint": [
"composer phpstan",
"composer pint"
"composer pint",
"composer phpstan"
],
"test": [
"@php vendor/bin/testbench package:test"
],
"coverage": [
"@php vendor/bin/phpunit --testsuite=default --coverage-clover=coverage.xml --coverage-filter=src --path-coverage"
"@php vendor/bin/pest --testsuite=default --coverage-clover=coverage.xml --coverage-filter=src --path-coverage"
],
"check" : [
"composer lint",
"composer test"
]
},
"config": {
"allow-plugins": {
"pestphp/pest-plugin": true
}
}
}
Loading
Loading