Skip to content
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
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer remove --dev phpunit/phpunit
- run: php examples/index.php &
- run: composer install -d tests/install-as-dep/
- run: php tests/install-as-dep/public/index.php &
- run: bash tests/await.sh
- run: bash tests/acceptance.sh

Expand All @@ -71,9 +71,9 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer remove --dev phpunit/phpunit
- run: docker run -d -v "$PWD":/home/framework-x php:${{ matrix.php }}-fpm
- run: docker run -d -p 80:80 --link $(docker ps -qn1):php -v "$PWD":/home/framework-x -v "$PWD"/examples/nginx/nginx.conf:/etc/nginx/conf.d/default.conf nginx:stable-alpine
- run: composer install -d tests/install-as-dep/
- run: docker run -d -v "$PWD/tests/install-as-dep/":/home/framework-x/ -v "$PWD/examples/index.php":/home/framework-x/public/index.php -v "$PWD/LICENSE":/home/framework-x/LICENSE -v "$PWD/tests/":/home/framework-x/tests/ php:${{ matrix.php }}-fpm
- run: docker run -d -p 80:80 --link $(docker ps -qn1):php -v "$PWD/tests/install-as-dep/":/home/framework-x/ -v "$PWD"/examples/nginx/nginx.conf:/etc/nginx/conf.d/default.conf nginx:stable-alpine
- run: bash tests/await.sh http://localhost
- run: bash tests/acceptance.sh http://localhost

Expand All @@ -94,8 +94,8 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer remove --dev phpunit/phpunit
- run: docker run -d -p 80:80 -v "$PWD":/home/framework-x php:${{ matrix.php }}-apache sh -c "rmdir /var/www/html;ln -s /home/framework-x/examples/apache /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
- run: composer install -d tests/install-as-dep/
- run: docker run -d -p 80:80 -v "$PWD/tests/install-as-dep/":/home/framework-x/ -v "$PWD/examples/index.php":/home/framework-x/public/index.php -v "$PWD/LICENSE":/home/framework-x/LICENSE -v "$PWD/tests/":/home/framework-x/tests/ -v "$PWD/examples/apache/.htaccess":/home/framework-x/public/.htaccess php:${{ matrix.php }}-apache sh -c "rmdir /var/www/html;ln -s /home/framework-x/public /var/www/html;ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled; apache2-foreground"
- run: bash tests/await.sh http://localhost
- run: bash tests/acceptance.sh http://localhost

Expand All @@ -116,7 +116,7 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer remove --dev phpunit/phpunit
- run: php -S localhost:8080 examples/index.php &
- run: composer install -d tests/install-as-dep/
- run: php -S localhost:8080 tests/install-as-dep/public/index.php &
- run: bash tests/await.sh
- run: bash tests/acceptance.sh
3 changes: 0 additions & 3 deletions examples/apache/index.php

This file was deleted.

4 changes: 3 additions & 1 deletion examples/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
use Psr\Http\Message\ServerRequestInterface;
use React\Stream\ThroughStream;

require __DIR__ . '/../vendor/autoload.php';
// example uses `@include` for test suite only, real-world examples should use `require` instead
// require __DIR__ . '/../vendor/autoload.php';
@include __DIR__ . '/../vendor/autoload.php';

$app = new FrameworkX\App();

Expand Down
2 changes: 1 addition & 1 deletion examples/nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
server {
root /home/framework-x/examples/nginx/public;
root /home/framework-x/public;
index index.php index.html;

location / {
Expand Down
3 changes: 0 additions & 3 deletions examples/nginx/public/index.php

This file was deleted.

1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<testsuites>
<testsuite name="Framework X test suite">
<directory>./tests/</directory>
<exclude>./tests/install-as-dep/</exclude>
</testsuite>
</testsuites>
<coverage>
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml.legacy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<testsuites>
<testsuite name="Framework X test suite">
<directory>./tests/</directory>
<exclude>./tests/install-as-dep/</exclude>
</testsuite>
</testsuites>
<filter>
Expand Down
2 changes: 2 additions & 0 deletions tests/install-as-dep/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/composer.lock
/vendor/
15 changes: 15 additions & 0 deletions tests/install-as-dep/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"require": {
"clue/framework-x": "*@dev",
"react/async": "^4@dev || ^3@dev"
},
"repositories": [
{
"type": "path",
"url": "../../",
"options": {
"symlink": false
}
}
]
}
5 changes: 5 additions & 0 deletions tests/install-as-dep/public/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

require __DIR__ . '/../vendor/autoload.php';

require __DIR__ . '/../../../examples/index.php';