Skip to content

Commit

Permalink
Update GitHub Actions for Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
laravel-shift committed Feb 27, 2024
1 parent cb00c55 commit 6cee4fa
Showing 1 changed file with 48 additions and 13 deletions.
61 changes: 48 additions & 13 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,121 @@ name: Run tests

on:
push:
branches: [main]
branches:
- main
paths-ignore:
- "docs/**"
- "README.md"
- docs/**
- README.md
pull_request:
branches: [main]
branches:
- main

jobs:
vite:
if: ${{ !startsWith(github.event.head_commit.message, 'release:') }}
if: "${{ !startsWith(github.event.head_commit.message, 'release:') }}"


runs-on: ${{ matrix.os }}


strategy:
matrix:
node-version: [16.x]
os: [ubuntu-latest, windows-latest]
node-version:
- 16.x
os:
- ubuntu-latest
- windows-latest


name: Vite - Node ${{ matrix.os }} - ${{ matrix.os }}


steps:
- uses: actions/checkout@v2


- name: Install pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.24.4


- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
cache: "pnpm"
cache: pnpm

- run: pnpm install


- name: Build
run: pnpm run build


- name: Test
run: pnpm run test:vite

php:
if: ${{ !startsWith(github.event.head_commit.message, 'release:') }}
if: "${{ !startsWith(github.event.head_commit.message, 'release:') }}"


runs-on: ${{ matrix.os }}


strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.1, 8.0]
laravel: ["8.*", "9.*", 10.*]
php: [8.0, 8.1, '8.2']
laravel: ['8.*', '9.*', '10.*', '11.*']
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: "8.*"
- laravel: 8.*
testbench: 6.*
- laravel: "9.*"
- laravel: 9.*
testbench: 7.x-dev
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1


name: PHP ${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}


steps:
- name: Checkout code
uses: actions/checkout@v2


- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
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 require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest

0 comments on commit 6cee4fa

Please sign in to comment.