Skip to content

Commit

Permalink
Run tests also in PHP 8.3 in CI
Browse files Browse the repository at this point in the history
Further upgrade actions/checkout to v4, remove the deprecated
--no-suggest option from composer install and some code style changes when running PHP CS Fixer with the latest version.
  • Loading branch information
otsch committed Oct 29, 2023
1 parent 4e71cae commit ddecbcd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI (tests, static analysis and code style)
name: CI

on: pull_request

Expand All @@ -9,18 +9,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Check PHP Version
run: php -v

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run PHP CS Fixer
run: composer cs
Expand All @@ -30,22 +27,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
php-versions: ['8.0', '8.1', '8.2', '8.3']

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}

- name: Check PHP Version
run: php -v

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run tests
run: vendor/bin/pest --coverage-clover clover.xml
Expand All @@ -56,18 +50,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'

- name: Check PHP Version
run: php -v

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
run: composer install --prefer-dist --no-progress

- name: Run PHPStan
run: composer stan
24 changes: 12 additions & 12 deletions tests/DirtyHookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -23,7 +23,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -39,7 +39,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -55,7 +55,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -71,7 +71,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -89,7 +89,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -107,7 +107,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -123,7 +123,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -141,7 +141,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -157,7 +157,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -175,7 +175,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand All @@ -191,7 +191,7 @@

$hookWasCalled = false;

$query->setDirtyHook(function () use (& $hookWasCalled) {
$query->setDirtyHook(function () use (&$hookWasCalled) {
$hookWasCalled = true;
});

Expand Down

0 comments on commit ddecbcd

Please sign in to comment.