Merge pull request #39 from medmen/dependabot/composer/phpstan/phpsta… #123
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: Tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
name: Tests PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
# continue-on-error: ${{ matrix.experimental }} | |
# strategy: | |
# matrix: | |
# php: [8.1] | |
# experimental: [false] | |
# include: | |
# - php: 8.1 | |
# analysis: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP with Xdebug | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
coverage: xdebug | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/composer-cache | |
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}- | |
- name: Install dependencies with Composer | |
uses: php-actions/composer@master | |
with: | |
php_version: "8.1" | |
php_extensions: calendar mbstring intl xdebug | |
args: -q --no-ansi --no-progress --no-interaction --prefer-dist --optimize-autoloader | |
- name: Execute tests (Unit and Feature tests) via PestPHP | |
run: vendor/bin/pest --coverage --min=90 --coverage-clover clover.xml | |
# - name: PhpUnit Tests | |
# uses: php-actions/phpunit@v3 | |
# with: | |
# php_version: 8.1 | |
# php_extensions: calendar mbstring intl xdebug | |
# bootstrap: vendor/autoload.php | |
# configuration: tests/phpunit.xml | |
# args: --coverage-text | |
# env: | |
# XDEBUG_MODE: coverage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: debug-output | |
path: output.log |