Skip to content

Commit

Permalink
Fix workflow (#1048)
Browse files Browse the repository at this point in the history
* Fix workflow

* Split tests

* SKip L6,7,8 on PHP8,2
  • Loading branch information
barryvdh authored May 13, 2024
1 parent 02580c0 commit 235c9c2
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 6 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/run-static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Static Analysis

on:
push:
branches:
- master
pull_request:
branches:
- "*"
schedule:
- cron: '0 0 * * *'

jobs:
php-tests:
runs-on: ubuntu-latest

timeout-minutes: 15

env:
COMPOSER_NO_INTERACTION: 1

strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3]
laravel: [10.*, 11.*]
dependency-version: [prefer-stable]
exclude:
- laravel: 11.*
php: 8.1

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
extensions: mbstring

- name: Install dependencies
run: |
composer remove phpro/grumphp --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
- name: Run Static Analysis
run: composer phpstan
15 changes: 9 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
- master
pull_request:
branches:
- *
- "*"
schedule:
- cron: '0 0 * * *'

jobs:
php-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

timeout-minutes: 15

Expand All @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.2, 7.3, 7.4, 8.0, '8.2']
php: [7.2, 7.3, 7.4, 8.0, 8.2]
laravel: ['6.*', '7.*', '8.*', '11.*']
dependency-version: [prefer-lowest, prefer-stable]
include:
Expand Down Expand Up @@ -53,6 +53,12 @@ jobs:
exclude:
- laravel: 8.*
php: 7.2
- laravel: 6.*
php: 8.2
- laravel: 7.*
php: 8.2
- laravel: 8.*
php: 8.2
- php: 8.0
dependency-version: prefer-lowest
- laravel: 11.*
Expand Down Expand Up @@ -83,8 +89,5 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
- name: Run Static Analysis
run: composer phpstan

- name: Execute Unit Tests
run: composer test

0 comments on commit 235c9c2

Please sign in to comment.