Refactoring risky tests (#1226) #150
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: | |
# Allow manually triggering the workflow. | |
workflow_dispatch: | |
jobs: | |
phpunit: | |
name: PHPUnit on PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: ['7.4', '8.0', '8.1', '8.2'] | |
continue-on-error: ${{ matrix.php == '8.2' }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | |
tools: composer:v2 | |
extensions: mongodb, redis | |
coverage: xdebug | |
- name: Setup Problem Matchers | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install Dependencies | |
if: ${{ matrix.php != '8.2' }} | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --no-interaction --no-progress | |
- name: Install Dependencies (ignore platform) | |
if: ${{ matrix.php == '8.2' }} | |
uses: nick-invision/retry@v1 | |
with: | |
timeout_minutes: 5 | |
max_attempts: 5 | |
command: composer update --no-interaction --no-progress --ignore-platform-req=php | |
- name: Execute PHPUnit | |
run: vendor/bin/phpunit |