Update README.md (#4) #8
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: Linting and Tests | |
on: | |
pull_request: | |
branches: [main, release/*] | |
paths-ignore: | |
- "**/*.md" | |
- "*.md" | |
- "**/*.json" | |
push: | |
branches: [main] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ['8.0', '8.1', '8.2'] | |
laravel: [ '8.*', '9.*', '10.*', '11.*' ] | |
dependency-version: [ prefer-stable ] | |
include: | |
- laravel: 10.* | |
testbench: 8.* | |
- laravel: 9.* | |
testbench: 7.* | |
- laravel: 8.* | |
testbench: 6.* | |
- laravel: 11.* | |
testbench: 9.* | |
exclude: | |
- laravel: 10.* | |
php: 8.0 | |
- laravel: 11.* | |
php: 8.1 | |
- laravel: 11.* | |
php: 8.0 | |
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
- name: Copy .env.testing | |
run: php -r "file_exists('.env.testing') || copy('.env.testing.example', '.env.testing');" | |
- name: Set Nova credentials | |
run: composer config http-basic.nova.laravel.com ${{ secrets.NOVA_4_EMAIL }} ${{ secrets.NOVA_4_CREDENTIALS }} | |
- name: Install Dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: ./vendor/bin/phpunit | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.1" | |
- name: Copy .env.testing | |
run: php -r "file_exists('.env.testing') || copy('.env.testing.example', '.env.testing');" | |
- name: Set Nova credentials | |
run: composer config http-basic.nova.laravel.com ${{ secrets.NOVA_4_EMAIL }} ${{ secrets.NOVA_4_CREDENTIALS }} | |
- name: Install Dependencies | |
run: composer update --prefer-stable --prefer-dist --no-interaction | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: ./vendor/bin/php-cs-fixer fix --dry-run |