-
Notifications
You must be signed in to change notification settings - Fork 14
36 lines (34 loc) · 1.05 KB
/
Copy pathunit-tests.yml
File metadata and controls
36 lines (34 loc) · 1.05 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
name: unit tests
on:
pull_request:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
strategy:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ]
name: PHP ${{ matrix.php }} unit tests
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: error_reporting=E_ALL, display_errors=On, display_startup_errors=On
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run unit tests
run: php ./vendor/bin/phpunit --log-junit test-results/junit-${{ matrix.php }}.xml test/unit
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: failure()
with:
report_paths: 'test-results/junit-${{ matrix.php }}.xml'
check_name: 'Unit Test Report (PHP ${{ matrix.php }})'
detailed_summary: true
fail_on_failure: true