Tests #337
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: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.1, 8.2, 8.3] | |
composerflags: [ '' ] | |
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 }} ${{ matrix.composerflags }} --prefer-dist --no-interaction --no-progress | |
- name: Execute tests | |
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | |
# - name: Run benchmarks | |
# run: vendor/bin/phpbench run src/Benchmarks | |