-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (43 loc) · 1.27 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: PHPUnit
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: Test & Upload coverage.xml to Codecov
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup PHP 8.3
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, pdo, sqlite, pdo_sqlite
ini-values: max_execution_time=180
- name: Install PHP extensions
run: |
sudo apt update
sudo apt-get install -y php-phpdbg
- name: Install Composer Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Run tests via PHPUnit
env:
XDEBUG_MODE: coverage
run: |
vendor/bin/phpunit --coverage-clover=coverage.xml
cat ./coverage.xml
- name: Show coverage.xml
run: cat ./coverage.xml
- name: Upload coverage.xml to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
env_vars: PHP