php 8.3 #25
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
name: phpunit | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
static: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: php-actions/composer@v6 | |
- uses: php-actions/phpstan@v3 | |
with: | |
path: src tests | |
level: max | |
phpunit: | |
runs-on: ubuntu-latest | |
needs: static | |
strategy: | |
matrix: | |
php-versions: [ '8.1', '8.2', '8.3' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- uses: php-actions/composer@v6 | |
- name: Run test suite | |
run: composer run-script test | |
coverage100: | |
needs: phpunit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.3 | |
- uses: php-actions/composer@v6 | |
- name: generate coverage report | |
run: composer run-script test | |
- name: Code Coverage Check | |
uses: sourcetoad/phpunit-coverage-action@v1 | |
with: | |
clover_report_path: clover.xml | |
min_coverage_percent: 100 | |
fail_build_on_under: true |