Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
fail-fast: false
matrix:
php-version: [ "8.3", "8.4", "8.5" ]
dependencies: [ "lowest", "highest" ]

name: Tests on PHP ${{ matrix.php-version }}
name: PHP ${{ matrix.php-version }} - ${{ matrix.dependencies }} deps

steps:
- name: Checkout
Expand All @@ -28,21 +29,13 @@ jobs:
php-version: ${{ matrix.php-version }}
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v5
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-
- name: Validate composer.json
run: composer validate --no-check-lock

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer i --no-progress
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.dependencies }}

- name: Run test suite
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion tests/Unit/Extensions/ArraysExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testRandomElement(): void
$elements[] = $this->faker->unique()->randomElement($this->testArray);
}

$this->assertEqualsCanonicalizing($elements, $this->testArray);
$this->assertEqualsCanonicalizing(array_values($this->testArray), $elements);
}

public function testRandomKeyIndex(): void
Expand Down
Loading