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
56 changes: 49 additions & 7 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,58 @@ jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [7.3, 7.4, 8.0]
composer-flags: [null, --prefer-lowest]
php-version: ['8.2', '8.3', '8.4']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json
coverage: none
- run: composer update ${{ matrix.composer-flags }} --no-interaction --no-progress --prefer-dist --ansi
- run: npm install
- run: ./vendor/bin/phpunit --color=always
tools: composer:v2

- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.json', '**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php-version }}-

- name: Install composer dependencies
run: composer update --no-interaction --no-progress --prefer-dist --ansi

- name: Install npm dependencies
run: npm ci

- name: Cache Playwright browsers
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-

- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium

- name: Install Playwright system deps (cache hit path)
if: steps.playwright-cache.outputs.cache-hit == 'true'
run: npx playwright install-deps chromium

- name: Run PHPUnit
run: ./vendor/bin/phpunit --color=always
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.2",
"ext-json": "*",
"composer/semver": "^3.0",
"zoon/rialto": "^1.5",
"psr/log": "^3.0",
"thecodingmachine/safe": "^2.5"
"thecodingmachine/safe": "^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.2",
"monolog/monolog": "^3.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^11",
"symfony/console": "^7",
"symfony/filesystem": "^7",
"symfony/process": "^7",
"symfony/var-dumper": "^7",
"thecodingmachine/phpstan-safe-rule": "^1.2"
"thecodingmachine/phpstan-safe-rule": "^1.4"
},
"autoload": {
"psr-4": {
Expand Down
Loading
Loading