Update actions/setup-node action to v5 #125
Workflow file for this run
This file contains hidden or 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: run-tests | |
| on: [ push, pull_request ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| php: [ 8.3, 8.2 ] | |
| laravel: [ 11.* ] | |
| dependency-version: [ prefer-stable ] | |
| include: | |
| - 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 }}" | |
| 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) | |
| npm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| - name: Cache yarn dependencies | |
| uses: actions/cache@v4 | |
| id: npm-node_modules-cache | |
| with: | |
| path: node_modules | |
| key: npm-${{ hashFiles('package.json') }}-node-22 | |
| - name: Compile assets | |
| run: npm install && npm run prod |