~ #29
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: | |
- 'master' | |
- 'main' | |
- 'develop' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- 'ubuntu-latest' | |
- 'windows-latest' | |
- 'macos-latest' | |
php: [8.2] | |
dependency-version: [prefer-stable] | |
name: PHP${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: xdebug | |
- name: Install dependencies | |
run: composer update --${{ matrix.dependency-version }} --no-interaction | |
- name: Setup Problem Matches | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Execute tests on Ubuntu OS | |
if: matrix.os == 'ubuntu-latest' | |
run: XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.coverage.xml | |
- name: Execute tests on Windows OS | |
if: matrix.os == 'windows-latest' | |
run: vendor/bin/phpunit | |
- name: Execute tests on Mac OS | |
if: matrix.os == 'macos-latest' | |
run: vendor/bin/phpunit |