Tests #482
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: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4] | |
stability: ['prefer-stable'] | |
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip | |
coverage: xdebug | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: | | |
echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- uses: actions/cache@v2 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ matrix.stability }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-composer-${{ matrix.stability }}- | |
${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress | |
- name: Execute tests | |
run: vendor/bin/phpunit --verbose --testdox --coverage-text | |
- name: Execute phpstan | |
run: vendor/bin/phpstan analyse --no-progress |