Skip to content

Commit 4d942e2

Browse files
authored
feat(git): add coveralls to track repo coverage (#7)
This pull request updates the CI workflow to enhance testing and code coverage reporting. The most important changes involve adding the `xdebug` extension, generating code coverage during tests, and uploading the coverage report to Coveralls. ### CI workflow improvements: * [`.github/workflows/ci.yml`](diffhunk://#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR220-R229): Added the `xdebug` extension to the PHP setup to enable code coverage generation. * [`.github/workflows/ci.yml`](diffhunk://#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR220-R229): Updated the test step to generate code coverage using PHPUnit. * [`.github/workflows/ci.yml`](diffhunk://#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR220-R229): Added a new step to upload the generated code coverage report to Coveralls using the Coveralls GitHub Action.
2 parents c3ad1dd + d2bbde7 commit 4d942e2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,13 @@ jobs:
217217
uses: shivammathur/setup-php@v2
218218
with:
219219
php-version: '8.3'
220+
extensions: xdebug
220221
- name: Install dependencies
221222
run: composer install --prefer-dist --no-progress
222-
- name: Run tests
223-
run: vendor/bin/phpunit || echo "No tests found"
223+
- name: Run tests and generate code coverage
224+
run: vendor/bin/phpunit || echo "No tests found"
225+
- name: Upload coverage to Coveralls
226+
uses: coverallsapp/github-action@v2
227+
with:
228+
github-token: ${{ secrets.GITHUB_TOKEN }}
229+
path-to-lcov: coverage/coverage.xml

0 commit comments

Comments
 (0)