Skip to content

Merge pull request #40 from InteractionDesignFoundation/renovate/all-… #105

Merge pull request #40 from InteractionDesignFoundation/renovate/all-…

Merge pull request #40 from InteractionDesignFoundation/renovate/all-… #105

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]
laravel: [ 10.* ]
dependency-version: [ prefer-stable ]
include:
- laravel: 10.*
testbench: 8.*
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 }}"
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- 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