Skip to content

Merge pull request #27 from InteractionDesignFoundation/renovate/acti… #195

Merge pull request #27 from InteractionDesignFoundation/renovate/acti…

Merge pull request #27 from InteractionDesignFoundation/renovate/acti… #195

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.5, 8.4 ]
dependency-version: ['--prefer-lowest', '--prefer-stable']
laravel: [12.*, 11.*]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*
# L13 matrix entry ready for when laravel/nova supports it:
# - laravel: 13.*
# testbench: 11.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 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-core:${{ matrix.testbench }}"
- name: Execute tests
run: composer test
# NPM part (test whether assets can be compiled)
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24
- name: Cache yarn dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
id: npm-node_modules-cache
with:
path: node_modules
key: npm-${{ hashFiles('package.json') }}-node-22
- name: Compile assets
run: npm install && npm run nova:install && npm run prod