Skip to content

Merge pull request #120 from RonasIT/97_add_assert_for_test #192

Merge pull request #120 from RonasIT/97_add_assert_for_test

Merge pull request #120 from RonasIT/97_add_assert_for_test #192

name: Run tests with coverage
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
test-with-coverage:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- uses: actions/checkout@v3
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute unit tests via PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover build/logs/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