Skip to content

Commit 1c12419

Browse files
committed
added github workflow for test coverage with codecov
1 parent 79c299f commit 1c12419

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Workflow for code coverage
2+
on: [push, pull_request]
3+
jobs:
4+
run:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Checkout
8+
uses: actions/checkout@v4
9+
- name: Set up php 8.3
10+
uses: shivammathur/setup-php@v2
11+
with:
12+
php-version: '8.3'
13+
- name: Install dependencies
14+
run: composer self-update && composer install && composer dump-autoload
15+
- name: Run tests and collect coverage
16+
run: vendor/bin/phpunit --coverage-clover coverage.xml .
17+
- name: Upload coverage to Codecov
18+
uses: codecov/codecov-action@v5
19+
env:
20+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)