-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7927fc
commit d00ed23
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
test-suite: | ||
name: PHPStan, PHPcs & Testsuite | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# https://github.com/marketplace/actions/setup-php-action | ||
- name: Setup PHP 8.2 with Xdebug 3.x | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: xdebug | ||
extensions: intl | ||
|
||
# https://github.com/marketplace/actions/checkout | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: composer install --prefer-dist | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse | ||
|
||
- name: Run PHPcs fixer dry-run | ||
run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --config=.php-cs-fixer.dist.php | ||
|
||
- name: Run test suite | ||
run: vendor/bin/phpunit --fail-on-incomplete --log-junit junit.xml --coverage-clover clover.xml | ||
|
||
# https://github.com/marketplace/actions/codecov | ||
- name: Send test coverage to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: clover.xml | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) |