-
Notifications
You must be signed in to change notification settings - Fork 338
47 lines (39 loc) · 1.17 KB
/
phpunit.yml
File metadata and controls
47 lines (39 loc) · 1.17 KB
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
47
name: PHPUnit
# If a pull-request is pushed then cancel all previously running jobs related
# to that pull-request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
on:
# push:
pull_request:
types: [opened, synchronize, reopened]
branches:
- develop
permissions:
contents: read
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ["8.2", "8.3", "8.4", "8.5"]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
- name: Create main config.php for unit tests
run: cp config/config.dist.php config/config.php
- name: Unit Tests
run: |
set -o pipefail
composer phpunit | tee phpunit.log
if ! grep -qE "Tests:|OK \(" phpunit.log; then
echo "❌ PHPUnit exited early (no summary line found)"
exit 1
fi