Skip to content

Commit f6824ca

Browse files
committed
Add workflows/coverage.yml
1 parent 5f79a88 commit f6824ca

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: true
14+
matrix:
15+
php: [7.4, 8.0, 8.1]
16+
stability: [ prefer-stable ]
17+
18+
name: PHP ${{ matrix.php }}
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v3
23+
24+
- name: Setup PHP ${{ matrix.php }}
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php }}
28+
extensions: dom, curl, libxml, mbstring, zip
29+
tools: composer:v2
30+
coverage: xdebug
31+
32+
- name: composer install
33+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
34+
35+
- name: Run tests
36+
run: vendor/bin/phpunit --coverage-clover coverage.xml
37+
38+
- name: Codecov
39+
uses: codecov/codecov-action@v3.1.0
40+
with:
41+
files: ./coverage.xml

0 commit comments

Comments
 (0)