-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (33 loc) · 1.13 KB
/
coverage.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
name: coverage
on:
push:
branches:
- 'master'
paths:
- 'src/**'
- 'test/**'
- '.github/workflows/coverage.yml'
- '.scrutinizer.yml'
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
extensions: opcache, curl, dom, mbstring, pdo, pdo_sqlite, sqlite3, json, xml, xmlwriter, tokenizer, openssl, iconv
php-version: 8.3
tools: composer:v2
- name: Install composer with dev dependencies
run: composer update --optimize-autoloader --classmap-authoritative --prefer-dist --no-progress --no-interaction --ansi
- name: Run PHPUnit tests and generate coverage.
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: github.repository == 'lav45/yii2-settings'
with:
cli-args: "--format=php-clover coverage.xml --revision=${{ github.sha }}"