WIP #144
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: Laravel Package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2, 8.1] | |
name: PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v1 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
- name: Setup PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, pgsql, pdo_pgsql | |
coverage: none | |
- uses: zhulik/[email protected] | |
with: | |
redis version: '5' | |
number of databases: 100 | |
- uses: harmon758/postgresql-action@v1 | |
with: | |
postgresql version: '15' | |
postgresql db: 'testing' | |
postgresql user: 'homestead' | |
postgresql password: 'secret' | |
- name: Remove Nova on a pull request | |
if: github.event_name == 'pull_request' | |
run: composer remove laravel/nova --no-update --no-interaction --dev | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: | | |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}" | |
composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
- name: Execute Integration and Feature tests via PHPUnit | |
run: vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite Integration,Feature | |
- name: Execute Nova tests via PHPUnit | |
if: github.event_name != 'pull_request' | |
run: vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite Nova |