Skip to content

Commit

Permalink
Add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed May 8, 2023
1 parent bcd8202 commit add3c34
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cover.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
branches:
- dev

name: CI

jobs:
run:
name: Tests

strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ '8.1', '8.2' ]

runs-on: ${{ matrix.operating-system }}

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: json

- name: Install dependencies with composer
run: composer install

- name: Run tests
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-clover clover.xml

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v

0 comments on commit add3c34

Please sign in to comment.