Files
EmailValidator/.github/workflows/tests.yml
T
Eduardo Gulias Davis 676ee0fd14 Improve actions and deps (#423)
* Improve actions

* Update actions deps

* Deps updates
2026-11-22 17:01:19 +01:00

65 lines
1.6 KiB
YAML

name: unit-tests
on:
push:
branches:
- '*.x'
pull_request:
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
php: ['8.1', '8.2', '8.3']
deps: [highest]
include:
- php: '8.1'
deps: lowest
name: PHP ${{ matrix.php }} / ${{ matrix.deps }}
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' && 'xdebug' || 'none' }}
- name: Install dependencies
uses: ramsey/composer-install@v4
with:
dependency-versions: ${{ matrix.deps }}
- name: Setup logs directory
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
run: mkdir -p build/logs
- name: Execute tests
if: ${{ matrix.php != '8.1' || matrix.deps != 'lowest' }}
run: vendor/bin/phpunit --exclude-group flaky
- name: Execute tests with coverage
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml --exclude-group flaky
- name: Store artifacts
if: ${{ matrix.php == '8.1' && matrix.deps == 'lowest' }}
uses: actions/upload-artifact@v7
with:
name: clover.xml
path: build/logs/clover.xml
if-no-files-found: error