71
loading...
This website collects cookies to deliver better user experience
Code coverage is the percentage of code which is covered by automated tests. Code coverage measurement simply determines which lines of code / instructions have been executed through a test run, and which lines / instructions have not. The percentage is calculated based on code covered and all code (number of lines of code).
- name: Execute tests (Unit and Feature tests) via PestPHP
run: vendor/bin/pest --coverage-clover clover.xml
- name: Generate test coverage badge
uses: timkrase/phpunit-coverage-[email protected]
with:
coverage_badge_path: 'badge-coverage.svg'
push_badge: true
repo_token: ${{ secrets.GITHUB_TOKEN }}
[](https://packagist.org/packages/hi-folks/array)
name: Test Coverage PHP Package
on:
push:
branches:
- main
jobs:
laravel-tests:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: [ '8.0' ]
name: P${{ matrix.php-versions }} - L${{ matrix.laravel }} - ${{ matrix.operating-system}}
steps:
- uses: actions/checkout@v2
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Show dir
run: pwd
- name: PHP Version
run: php --version
# Code quality
- name: Execute tests (Unit and Feature tests) via PestPHP
# Set environment
env:
SESSION_DRIVER: array
run: vendor/bin/pest --coverage-clover clover.xml
- name: Generate test coverage badge
uses: timkrase/phpunit-coverage-[email protected]
with:
coverage_badge_path: 'badge-coverage.svg'
push_badge: true
repo_token: ${{ secrets.GITHUB_TOKEN }}