Skip to content

fix tests and supported Laravel versions #57

fix tests and supported Laravel versions

fix tests and supported Laravel versions #57

Workflow file for this run

name: run-tests
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.3, 8.2 ]
dependency-version: ['--prefer-lowest', '--prefer-stable']
laravel: [11.*, 10.*]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
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 dependencies
run: |
composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_4_LICENSE_KEY }}" --ansi
composer update ${{ matrix.dependency-version }} --prefer-dist --no-interaction --ansi --with="laravel/framework:${{ matrix.laravel }}" --with="orchestra/testbench:${{ matrix.testbench }}"
- name: Execute tests
run: composer test
# NPM part (test whether assets can be compiled)
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache yarn dependencies
uses: actions/cache@v4
id: npm-node_modules-cache
with:
path: node_modules
key: npm-${{ hashFiles('package.json') }}-node-20
- name: Compile assets
run: npm install && npm run nova:install && npm run prod