Skip to content

Commit d7e828b

Browse files
committed
chore: added coverage action
1 parent 60bdc68 commit d7e828b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Unit test coverage
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
tests:
9+
runs-on: ubuntu-latest
10+
name: Unit test coverage
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: 7.4
20+
tools: composer:v2
21+
coverage: pcov
22+
23+
- name: Install dependencies
24+
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
25+
26+
- name: Execute tests
27+
run: vendor/bin/phpunit --verbose
28+
29+
- name: Send coverage to Scrutinizer
30+
run: |
31+
wget https://scrutinizer-ci.com/ocular.phar
32+
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

0 commit comments

Comments
 (0)