Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/bc-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,36 @@ jobs:
name: "Backwards Compatibility Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, fileinfo, sodium
coverage: none

- name: "Cache composer dependencies"
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.json') }}

- name: "Install dependencies"
run: "composer install"
run: composer install --no-interaction --prefer-dist

- name: "Set up git"
run: |
git config --global --add safe.directory '*'
git fetch --depth=1 origin main

- name: "Install BC check"
run: "composer require --dev roave/backward-compatibility-check"
run: |
composer config minimum-stability dev
composer require --dev roave/backward-compatibility-check --prefer-dist --with-all-dependencies

- name: "Check for BC breaks"
run: "vendor/bin/roave-backward-compatibility-check"
run: |
vendor/bin/roave-backward-compatibility-check --format=markdown --from=origin/main
2 changes: 1 addition & 1 deletion .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
coverage: xdebug

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,36 @@ jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.1, 8.2, 8.3, 8.4]
laravel: ['10.*', '11.*']
php: [8.1, 8.2, 8.3]
laravel: ['10.*', '11.*', '12.*']
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.67
phpunit: ^10.5
- laravel: 11.*
testbench: 9.*
carbon: ^2.67
phpunit: ^10.5
- laravel: 12.*
testbench: 10.*
carbon: ^3.8
phpunit: ^11.0
exclude:
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 8.1

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

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -45,8 +55,11 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.64.1" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:${{ matrix.carbon }}" "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --with-all-dependencies

- name: List Installed Dependencies
run: composer show -D

- name: Execute tests
run: vendor/bin/phpunit --coverage-clover build/clover.xml
14 changes: 9 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@
],
"require": {
"php": "^8.1",
"illuminate/contracts": "^10.0|^11.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"spatie/laravel-package-tools": "^1.13"
},
"require-dev": {
"brianium/paratest": "^6.3|^7.4",
"infection/infection": "^0.27.3",
"larastan/larastan": "^2.0",
"laravel/pint": "^1.0",
"nesbot/carbon": "^2.67|^3.8",
"nunomaduro/collision": "^7.0|^8.0",
"orchestra/testbench": "^8.0|^9.0",
"phpunit/phpunit": "^9.5|^10.5"
"orchestra/testbench": "^8.0|^9.0|^10.0",
"phpunit/phpunit": "^9.5|^10.5|^11.0"
},
"autoload": {
"psr-4": {
Expand All @@ -41,12 +42,15 @@
},
"scripts": {
"test": "./vendor/bin/testbench package:test --no-coverage",
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
"test:types": "vendor/bin/phpstan analyse --ansi",
"test:style": "vendor/bin/pint --test"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true
"infection/extension-installer": true,
"pestphp/pest-plugin": true
}
},
"extra": {
Expand Down
Loading
Loading