Expect tests to not perform assertions #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- '.github/workflows/tests.yml' | |
- 'composer.json' | |
push: | |
branches: ['main'] | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
- '.github/workflows/tests.yml' | |
- 'composer.json' | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php: ["8.1", "8.2", "8.3"] | |
laravel: ["^10.0", "^11.0"] | |
exclude: | |
- laravel: "^11.0" | |
php: "8.1" | |
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
- name: Setup Problem Matchers | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install composer dependencies | |
run: | | |
composer require "illuminate/collections:${{ matrix.laravel }}" --no-interaction --no-update | |
composer update --with-all-dependencies --prefer-dist --no-interaction | |
- name: Run tests | |
run: php vendor/bin/phpunit --testdox | |
- name: Run PHPStan | |
run: php vendor/bin/phpstan --error-format=github |