-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·53 lines (52 loc) · 1.83 KB
/
phpunit.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
47
48
49
50
51
52
name: Unit Tests
on: [push]
env:
CODECOV_TOKEN: 0b73aafa-099e-449b-8682-3afe35bde014
jobs:
run:
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ 'ubuntu-latest', 'windows-latest' ]
php-versions: [ '8.1', '8.3' ]
steps:
- name: Checkout Source.
uses: actions/checkout@v2
- name: Setup PHP 8.1
if: ${{ matrix.php-versions == '8.1' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
extensions: mbstring, intl, fileinfo
- name: Run PHPUnit 9
if: ${{ matrix.php-versions == '8.1' }}
run: |
composer install
php vendor/bin/phpunit tests --bootstrap vendor/autoload.php --coverage-clover ./coverage.xml
- name: Push PHPUnit 9 to Codecov
if: ${{ matrix.php-versions == '8.1' && matrix.operating-system == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
verbose: true
- name: Setup PHP 8.3
if: ${{ matrix.php-versions == '8.3' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
extensions: mbstring, intl, fileinfo
- name: Run PHPUnit 11
if: ${{ matrix.php-versions == '8.3' }}
run: |
composer install
php phpunit11.phar -c ./phpunit11.xml --coverage-clover ./coverage.xml
- name: Push to Codecov Probably
if: ${{ matrix.php-versions == '8.3' && matrix.operating-system == 'ubuntu-latest' }}
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
verbose: true