-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.23 KB
/
unit-tests.yml
File metadata and controls
52 lines (44 loc) · 1.23 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
48
49
50
51
52
name: Unit Tests
on:
push:
pull_request:
jobs:
build-test:
strategy:
matrix:
php-version: [ "8.1", "8.2" ]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install composer and dependencies
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-version }}
-
if: ${{ matrix.php-version == '8.2' }}
name: PHPStan Static Analysis
uses: php-actions/phpstan@v3
with:
path: lib/ test/
php_version: ${{ matrix.php-version }}
configuration: phpstan.neon
- name: PHPUnit Tests
uses: php-actions/phpunit@v3
env:
XDEBUG_MODE: coverage
with:
php_version: ${{ matrix.php-version }}
bootstrap: test/bootstrap.php
testsuite: Test Suite
configuration: phpunit.xml
php_extensions: xdebug
args: test --coverage-clover ./coverage.xml
-
if: ${{ matrix.php-version == '8.2' }}
name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODE_COV_TOKEN }}
files: ./coverage.xml
verbose: true