Skip to content
Open
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
122 changes: 63 additions & 59 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,72 +1,76 @@
name: Tests

on:
push:
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *'
push:
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'

jobs:
test:
if: github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.4, 8.3, 8.2]
laravel: [12.*, 11.*, 10.*]
dependencies: [lowest, stable]
include:
- laravel: 10.*
testbench: ^8.0
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*
- dependencies: lowest
carbon: ^3.8.4
- laravel: 10.*
dependencies: lowest
carbon: ^2.62.1
test:
if: "github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'"

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.4, 8.3, 8.2]
laravel: ['10.*', '11.*', '12.*', '13.*']
dependencies: [lowest, stable]
include:
- laravel: 10.*
testbench: ^8.0
- laravel: 11.*
testbench: 9.*
- laravel: 12.*
testbench: 10.*
- dependencies: lowest
carbon: ^3.8.4
- laravel: 10.*
dependencies: lowest
carbon: ^2.62.1
- laravel: 13.*
testbench: ^11.0
exclude:
- laravel: 13.*
php: 8.2

- 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: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }}

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Require Laravel Version
run: >
composer require
"laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}"
--no-interaction --no-update
- 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: Require Minimum Packages for version
if: ${{ matrix.dependencies == 'lowest' }}
run: >
composer require
"nesbot/carbon:${{ matrix.carbon }}"
--no-interaction --no-update
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}
- name: Require Laravel Version
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update

- name: Execute tests
run: vendor/bin/pest
- name: Require Minimum Packages for version
if: "${{ matrix.dependencies == 'lowest' }}"
run: |
composer require "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}

- name: Execute tests
run: vendor/bin/pest
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
],
"require": {
"php": "^8.2",
"illuminate/contracts": "12.*|11.*|10.*"
"illuminate/contracts": "12.*|11.*|10.*|^13.0"
},
"require-dev": {
"composer/semver": "^3.0",
"larastan/larastan": "^3.0|^2.0|^1.0",
"laravel/pint": "^1.0",
"mockery/mockery": "^1.6.12",
"nunomaduro/collision": "^8.0|^7.8|^6.0",
"orchestra/testbench": "^10.0|^9.0|^8.0",
"orchestra/testbench": "^10.0|^9.0|^8.0|^11.0",
"pestphp/pest": "^1.21|^2.34|^3.0",
"pestphp/pest-plugin-arch": "^2.6|^3.0",
"pestphp/pest-plugin-laravel": "^1.1|^2.3|^3.0",
Expand Down
Loading