Skip to content
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

Introduce modularized feature #2

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
23 changes: 17 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,37 @@ on:

jobs:
tests:
name: Test on PHP ${{ matrix.php_versions }}
name: Test on PHP ${{ matrix.php }}

runs-on: ubuntu-latest
continue-on-error: ${{ matrix.php_versions == '8.1' }}
continue-on-error: ${{ contains('8.1,8.2', matrix.php) }}
if: "!contains(github.event.head_commit.message, '--skip ci') && !github.event.pull_request.draft"

strategy:
matrix:
php_versions: ['7.4', '8.0', '8.1']
php:
- '7.4'
- '8.0'
dependencies:
- "lowest"
- "highest"
include:
- php: '8.1'
composer-options: "--ignore-platform-reqs"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
php-version: ${{ matrix.php }}
coverage: xdebug2

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

- name: Run test suite
run: vendor/bin/codecept run unit --coverage-text
Expand Down
8 changes: 0 additions & 8 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
commands:
- Codeception\Command\GenerateWPUnit
- Codeception\Command\GenerateWPRestApi
- Codeception\Command\GenerateWPRestController
- Codeception\Command\GenerateWPRestPostTypeController
- Codeception\Command\GenerateWPAjax
- Codeception\Command\GenerateWPCanonical
- Codeception\Command\GenerateWPXMLRPC
params:
- .env
coverage:
Expand Down
36 changes: 26 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
"role": "Developer"
}
],
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php" : ">=7.4",
"rdlowrey/auryn": "^1.4",
"italystrap/config": "^2.2",
"ocramius/proxy-manager": "~2.11.0"
"ocramius/proxy-manager": "~2.11.0 || ~2.14.1",
"brick/varexporter": "^0.3.8",
"webimpress/safe-writer": "^2.2"
},
"require-dev": {
"lucatume/wp-browser": "^3.0",
Expand All @@ -36,12 +39,18 @@
"infection/infection": "^0.26.6",
"infection/codeception-adapter": "^0.4.1",

"rector/rector": "^0.15.17",
"italystrap/debug": "^2.1"
"rector/rector": "^1.2",
"italystrap/debug": "dev-master",
"italystrap/finder": "dev-master",
"laminas/laminas-config-aggregator": "^1.9",
"crellbar/prophecy-extensions": "^1.1"
},
"autoload": {
"psr-4": {
"ItalyStrap\\Empress\\": "src/"
"ItalyStrap\\Empress\\": [
"src/",
"bridge/"
]
},
"files": [
"namespace-bc-aliases.php",
Expand All @@ -50,7 +59,11 @@
},
"autoload-dev": {
"psr-4": {
"ItalyStrap\\Tests\\": "tests/src/",
"ItalyStrap\\Tests\\Modules\\": "tests/_data/fixtures/modules/",
"ItalyStrap\\Tests\\": [
"tests/src/",
"tests/_data/fixtures/src/"
],
"ItalyStrap\\Tests\\Unit\\": "tests/unit/"
},
"files": [
Expand All @@ -73,12 +86,10 @@
"@php ./vendor/bin/psalm --no-cache"
],
"unit": [
"@php vendor/bin/codecept run unit",
"@clean"
"@php vendor/bin/codecept run unit"
],
"unit:debug": [
"@php vendor/bin/codecept run unit --debug",
"@clean"
"@php vendor/bin/codecept run unit --debug"
],
"infection": [
"@php vendor/bin/infection --threads=4"
Expand All @@ -97,6 +108,11 @@
],
"clean": [
"@php vendor/bin/codecept clean"
],
"qa": [
"@cs",
"@psalm",
"@unit"
]
},
"support" : {
Expand Down
Loading
Loading