-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.02 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
name: PHPUnit Tests
on: [push, pull_request]
env:
CC_TEST_REPORTER_ID: 1d1f74ba47a7d5ca9fd110c771ddac54d67608513924b89df2b7ed8761541244
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring
tools: composer
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer clearcache && composer install --prefer-dist
- name: Run tests
run: ./vendor/bin/phpunit --coverage-clover=clover.xml --configuration actions.phpunit.xml
- name: Code coverage
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter after-build -t clover
if: matrix.php == '8.1'