-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (38 loc) · 1.08 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Tests"
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'
jobs:
tests:
name: PHP ${{ matrix.php-version }} - ${{ matrix.composer }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [8.1, 8.2, 8.3, 8.4]
composer: [highest, lowest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom
coverage: xdebug
tools: composer:v2
- uses: "ramsey/composer-install@v3"
with:
dependency-versions: "${{ matrix.composer }}"
- name: composer validate
run: composer validate --strict
- name: Run unit tests
run: "./vendor/bin/phpunit --colors=always --coverage-clover build/logs/clover.xml --coverage-text"
- name: Publish coverage report to Codecov
uses: "codecov/codecov-action@v5"