Skip to content

Update CI #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
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
35 changes: 23 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:

strategy:
matrix:
php: [8.0, 8.1, 8.2]
laravel: [8]
php: [8.2, 8.3, 8.4]
laravel: [10, 11]

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -23,17 +23,21 @@ jobs:
extensions: ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite
coverage: none

- name: Checkout Laravel 8 Sample
if: matrix.laravel == 8
uses: actions/checkout@v3
- name: Set Laravel version reference
run: echo "LV_REF=${MATRIX_LARAVEL%.*}" >> $GITHUB_ENV
env:
MATRIX_LARAVEL: ${{ matrix.laravel }}

- name: Checkout Laravel ${{ env.LV_REF }} Sample
uses: actions/checkout@v4
with:
repository: codeception/laravel-module-tests
path: framework-tests
ref: main
ref: ${{ env.LV_REF }}.x

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v3
Expand All @@ -42,20 +46,27 @@ jobs:
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer-

- name: Install PHPUnit 11
run: composer require --dev --no-update "phpunit/phpunit=^11.0"

- name: Install dependencies
run: composer install --prefer-dist --no-progress
run: |
composer require symfony/console:^6.0 || ^7.0 --no-update
composer require codeception/module-asserts="3.*" --no-update
composer update --prefer-dist --no-progress --no-dev

- name: Validate composer.json and composer.lock
run: composer validate
run: composer validate --strict
working-directory: framework-tests

- name: Install Laravel Sample
run: |
composer remove codeception/module-laravel --dev --no-update
composer install --no-progress
composer require phpunit/phpunit:^11.0 --dev --no-update
composer update --no-progress
working-directory: framework-tests

- name: Prepare the test environment and run test suite
- name: Prepare the test environment
run: |
cp .env.testing .env
php artisan config:cache
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"minimum-stability": "RC",
"require": {
"php": "^8.0",
"php": "^8.2",
"ext-json": "*",
"codeception/lib-innerbrowser": "^3.1 | ^4.0",
"codeception/codeception": "^5.0.8",
Expand All @@ -28,7 +28,7 @@
"require-dev": {
"codeception/module-asserts": "^3.0",
"codeception/module-rest": "^3.3",
"laravel/framework": "^8.0"
"laravel/framework": "^10.0 | ^11.0"
},
"autoload": {
"classmap": ["src/"]
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ A Codeception module for Laravel framework.

## Requirements

* `Laravel 8` or higher, as per the [Laravel supported versions](https://laravel.com/docs/master/releases#support-policy).
* `PHP 7.4` or higher.
* `Laravel 10` or higher, as per the [Laravel supported versions](https://laravel.com/docs/master/releases#support-policy).
* `PHP 8.2` or higher.

## Installation

Expand Down
Loading