Skip to content

fix: strict change detection in TableTestState #1011

fix: strict change detection in TableTestState

fix: strict change detection in TableTestState #1011

name: Run tests with coverage
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
PHP_LATEST: &php-latest "8.5"
LARAVEL_LATEST: &laravel-latest "13.*"
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: [ "8.3", "8.4", "8.5" ]
laravel-version: [ "11.*", "12.*", "13.*" ]
exclude:
- php-version: *php-latest
laravel-version: *laravel-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/php-laravel-setup
with:
php-version: ${{ matrix.php-version }}
laravel-version: ${{ matrix.laravel-version }}
coverage: none
- name: Execute unit tests via PHPUnit
run: vendor/bin/phpunit
tests-with-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/php-laravel-setup
with:
php-version: *php-latest
laravel-version: *laravel-latest
coverage: xdebug
- name: Format code style via Pint
run: vendor/bin/pint --test
- name: Execute unit tests via PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Export coverage report
uses: actions/upload-artifact@v4
with:
name: clover.xml
path: build/logs
upload-to-coveralls:
needs: [ tests, tests-with-coverage ]
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@v2
- name: Checkout
uses: actions/checkout@v4
- name: Import coverage report
uses: actions/download-artifact@v4
with:
name: clover.xml
path: build/logs
- 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 --json_path=coveralls-upload.json