diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7eb8f28..3b631bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/examples/apache/index.php b/examples/apache/index.php deleted file mode 100644 index bc3f8c8..0000000 --- a/examples/apache/index.php +++ /dev/null @@ -1,3 +0,0 @@ - ./tests/ + ./tests/install-as-dep/ diff --git a/phpunit.xml.legacy b/phpunit.xml.legacy index cb0fd89..4b0eafb 100644 --- a/phpunit.xml.legacy +++ b/phpunit.xml.legacy @@ -8,6 +8,7 @@ ./tests/ + ./tests/install-as-dep/ diff --git a/tests/install-as-dep/.gitignore b/tests/install-as-dep/.gitignore new file mode 100644 index 0000000..c8153b5 --- /dev/null +++ b/tests/install-as-dep/.gitignore @@ -0,0 +1,2 @@ +/composer.lock +/vendor/ diff --git a/tests/install-as-dep/composer.json b/tests/install-as-dep/composer.json new file mode 100644 index 0000000..d404fd2 --- /dev/null +++ b/tests/install-as-dep/composer.json @@ -0,0 +1,15 @@ +{ + "require": { + "clue/framework-x": "*@dev", + "react/async": "^4@dev || ^3@dev" + }, + "repositories": [ + { + "type": "path", + "url": "../../", + "options": { + "symlink": false + } + } + ] +} diff --git a/tests/install-as-dep/public/index.php b/tests/install-as-dep/public/index.php new file mode 100644 index 0000000..f9ee1d0 --- /dev/null +++ b/tests/install-as-dep/public/index.php @@ -0,0 +1,5 @@ +