Skip to content

Commit

Permalink
Merge pull request #1175 from jrfnl/feature/ghactions-enable-testing-…
Browse files Browse the repository at this point in the history
…against-php82

GH Actions: run tests against PHP 8.2
  • Loading branch information
davedevelopment committed Apr 14, 2022
2 parents a049f0c + 331784e commit 8d128b0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Tests
on:
push:
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:

jobs:
phpunit:
Expand All @@ -11,7 +13,9 @@ jobs:

strategy:
matrix:
php: ['7.4', '8.0', '8.1']
php: ['7.4', '8.0', '8.1', '8.2']

continue-on-error: ${{ matrix.php == '8.2' }}

steps:
- name: Checkout Code
Expand All @@ -21,6 +25,7 @@ jobs:
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
Expand All @@ -29,11 +34,20 @@ jobs:
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
4 changes: 4 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./tests/Bootstrap.php"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
convertNoticesToExceptions="true"
convertDeprecationsToExceptions="true"
colors="true"
verbose="true"
>
Expand Down

0 comments on commit 8d128b0

Please sign in to comment.