Skip to content

Commit

Permalink
chore: use Pest to run tests (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Oct 5, 2020
1 parent 8db748f commit 1e71cc4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -17,6 +17,6 @@ jobs:
- name: Install
run: composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable --no-suggest
- name: Unit tests
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-text
run: composer test
- name: Codecov
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -2,4 +2,6 @@ composer.lock
phpunit.xml
vendor
clover.xml
.phpunit.result.cache
.phpunit.result.cache
.coverage
coverage.xml
12 changes: 11 additions & 1 deletion composer.json
Expand Up @@ -15,7 +15,9 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.16",
"phpunit/phpunit": "^9.0.0"
"pestphp/drift": "^0.3.0",
"pestphp/pest": "^0.3.8",
"phpunit/phpunit": "^9.3.10"
},
"suggest": {
"ext-mbstring": "If ext-mbstring is not available you MUST install symfony/polyfill-mbstring"
Expand All @@ -38,5 +40,13 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"scripts": {
"format": [
"vendor/bin/php-cs-fixer fix"
],
"test": [
"./vendor/bin/pest --coverage --min=100 --coverage-html=.coverage --coverage-clover=coverage.xml"
]
}
}
5 changes: 5 additions & 0 deletions tests/Helpers.php
@@ -0,0 +1,5 @@
<?php

namespace Tests;

// ..
5 changes: 5 additions & 0 deletions tests/Pest.php
@@ -0,0 +1,5 @@
<?php

use ArkEcosystem\Tests\Client\TestCase;

uses(TestCase::class)->in(__DIR__);

0 comments on commit 1e71cc4

Please sign in to comment.