Skip to content

Coverage

Coverage #866

Workflow file for this run

name: "Coverage"
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 15 * * 2'
jobs:
phpunit-tests:
strategy:
fail-fast: false
matrix:
php_versions: [
'8.3',
]
name: PHP ${{ matrix.php_versions }}
runs-on: ubuntu-latest
steps:
- name: install php ${{ matrix.php_versions }} with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
extensions: json ctype openssl ssh2 gd pcntl
coverage: xdebug
tools: none
- name: checkout repository
uses: actions/checkout@v4
- name: install npm dependencies
run: npm install
working-directory: laravel
- name: npm run build
run: npm run build
working-directory: laravel
- name: install dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
working-directory: laravel
- name: cache config, routes and views
run: |
php artisan optimize --env=testing
php artisan view:cache --env=testing
working-directory: laravel
- name: run migrations
run: php artisan migrate:fresh --no-interaction --env=testing
working-directory: laravel
- name: generate coverage report
run: php artisan test --without-tty --coverage --env=testing
working-directory: laravel
- name: upload code coverage report to codecov.io
uses: codecov/codecov-action@v4
with:
working-directory: laravel
token: ${{ secrets.CODECOV_TOKEN }}