Skip to content

Commit

Permalink
Support Lumen 10 (#130)
Browse files Browse the repository at this point in the history
* Support Lumen 10

* Add more runs

* Add more runs

* Add more runs

* Add more runs

* Add more runs
  • Loading branch information
DarkaOnLine authored May 9, 2023
1 parent a91f7aa commit 7d93fac
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 10 deletions.
44 changes: 41 additions & 3 deletions .github/workflows/test-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ '7.3', '8.0', '8.1' ]
swagger-lume-flags: ['latest', 'lumen-6-swagger-2', 'lumen-7-swagger-2', 'lumen-7-swagger-3']
php: [ '7.3', '8.0.2', '8.1' ]
swagger-lume-flags: ['latest', 'lumen-6-swagger-2', 'lumen-7-swagger-2', 'lumen-7-swagger-3', 'lumen-8-swagger-3', 'lumen-9-swagger-3', 'lumen-10-swagger-3', 'lumen-10-swagger-3-ui-4']

name: PHP ${{ matrix.php }} - ${{ matrix.swagger-lume-flags }}

steps:
- uses: actions/checkout@v2

- name: Info
run: |
echo ${{ matrix.php }} - ${{ matrix.swagger-lume-flags }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down Expand Up @@ -65,7 +69,41 @@ jobs:
run: |
composer require 'laravel/lumen-framework:7.*' --no-interaction --no-update
composer require 'zircote/swagger-php:3.*' --no-interaction --no-update
if: (matrix.php == '7.3' || matrix.php == '8.0') && matrix.swagger-lume-flags == 'lumen-7-swagger-3'
if: (matrix.php == '7.3') && matrix.swagger-lume-flags == 'lumen-7-swagger-3'

- name: Lumen 8 && Swagger 3
env:
SWAGGER_VERSION: '3.0'
run: |
composer require 'laravel/lumen-framework:8.*' --no-interaction --no-update
composer require 'zircote/swagger-php:3.*' --no-interaction --no-update
if: (matrix.php == '7.3' || matrix.php == '8.0') && matrix.swagger-lume-flags == 'lumen-8-swagger-3'

- name: Lumen 9 && Swagger 3
env:
SWAGGER_VERSION: '3.0'
run: |
composer require 'laravel/lumen-framework:9.*' --no-interaction --no-update
composer require 'zircote/swagger-php:3.*' --no-interaction --no-update
if: matrix.php == '8.0' && matrix.swagger-lume-flags == 'lumen-9-swagger-3'

- name: Lumen 10 && Swagger 3
env:
SWAGGER_VERSION: '3.0'
run: |
composer require 'laravel/lumen-framework:10.*' --no-interaction --no-update
composer require 'zircote/swagger-php:3.*' --no-interaction --no-update
if: matrix.php == '8.1' && matrix.swagger-lume-flags == 'lumen-10-swagger-3'

- name: Lumen 10 && Swagger 3 && Swagger-UI 4
env:
SWAGGER_VERSION: '3.0'
run: |
composer require 'laravel/lumen-framework:10.*' --no-interaction --no-update
composer require 'zircote/swagger-php:3.*' --no-interaction --no-update
composer require 'swagger-api/swagger-ui:4.*' --no-interaction --no-update
composer require 'phpunit/phpunit:10.*' --no-interaction --no-update
if: matrix.php == '8.1' && matrix.swagger-lume-flags == 'lumen-10-swagger-3-ui-4'

- name: Prepare code climate
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
.phpunit.result.cache
.phpunit.cache
.DS_Store
/tests/config
/tests/public
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
],
"require": {
"php": ">=7.2 || ^8.0",
"laravel/lumen-framework": "~6.0 || ~7.0 || ^8.0 || ^9.0",
"laravel/lumen-framework": "~6.0 || ~7.0 || ^8.0 || ^9.0 || ^10.0",
"zircote/swagger-php": "~2.0 || 3.*",
"swagger-api/swagger-ui": "^3.0"
"swagger-api/swagger-ui": "^3.0 || ^4.0"
},
"require-dev": {
"phpunit/phpunit": "9.*",
"phpunit/phpunit": "^10.0 || ^9.5",
"mockery/mockery": "1.*",
"php-coveralls/php-coveralls": "^2.0"
},
Expand Down
20 changes: 16 additions & 4 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" bootstrap="tests/bootstrap.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
backupGlobals="false"
bootstrap="tests/bootstrap.php"
colors="true"
processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</include>
<report>
<clover outputFile="./tests/storage/logs/test-reports/clover.xml"/>
<html outputDirectory="./tests/storage/logs/test-reports" lowUpperBound="50" highLowerBound="80"/>
Expand All @@ -21,4 +28,9 @@
<env name="CACHE_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
</phpunit>

0 comments on commit 7d93fac

Please sign in to comment.