diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64eab42..090d486 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,13 +9,12 @@ on: jobs: tests: runs-on: ubuntu-20.04 + timeout-minutes: 10 strategy: fail-fast: true - matrix: - php: ['8.1'] - name: PHP ${{ matrix.php }} + name: PHP 8.1 steps: - name: Checkout @@ -24,7 +23,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} + php-version: 8.1 tools: composer coverage: xdebug @@ -46,7 +45,7 @@ jobs: - name: PHPStan run: - vendor/bin/phpstan analyse -vvv + vendor/bin/phpstan analyse --xdebug -vvv - name: PHPUnit run: vendor/bin/phpunit --verbose @@ -59,4 +58,30 @@ jobs: cp build/coverage/clover.xml build/logs/clover.xml composer global require php-coveralls/php-coveralls php-coveralls --coverage_clover=build/logs/clover.xml -v - if: matrix.php == '8.1' + + tests-last: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + + strategy: + fail-fast: true + + name: PHP 8.2 - Last + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.2 + tools: composer + coverage: xdebug + + - name: Install dependencies + run: + composer update + + - name: PHPUnit + run: vendor/bin/phpunit --verbose diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc7bbe6..4d6dfa6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,17 +9,19 @@ variables: test:php: stage: test + timeout: 10 minutes cache: paths: - build/ - vendor/ before_script: - - composer install + - php -v + - composer update script: - composer normalize --dry-run --indent-size=4 --indent-style=space - vendor/bin/php-cs-fixer fix --diff --dry-run --verbose - vendor/bin/phpmd src xml phpmd.xml - - vendor/bin/phpstan analyse -vvv + - vendor/bin/phpstan analyse --xdebug -vvv - vendor/bin/phpunit --colors=never - phpdoc artifacts: @@ -28,8 +30,23 @@ test:php: - build/docs/ coverage: '/^\s*Lines:\s*\d+.\d+\%/' +test:php-last: + image: registry.gitlab.com/aplus-framework/images/base:3 + stage: test + timeout: 10 minutes + cache: + paths: + - vendor/ + before_script: + - php -v + - composer update + script: + - vendor/bin/phpunit --colors=never + coverage: '/^\s*Lines:\s*\d+.\d+\%/' + pages: stage: deploy + timeout: 10 minutes dependencies: - test:php environment: diff --git a/composer.json b/composer.json index 6e52fe5..17a3764 100644 --- a/composer.json +++ b/composer.json @@ -44,7 +44,7 @@ "aplus/events": "1.4.2", "aplus/factories": "1.0.1", "aplus/helpers": "3.0.1", - "aplus/http": "5.2.3", + "aplus/http": "5.2.4", "aplus/http-client": "4.2.1", "aplus/image": "2.2.3", "aplus/language": "3.0.2", @@ -53,7 +53,7 @@ "aplus/pagination": "3.3.0", "aplus/routing": "3.4.2", "aplus/session": "3.2.1", - "aplus/validation": "2.1.2" + "aplus/validation": "2.1.3" }, "require-dev": { "ext-xdebug": "*", diff --git a/docker-compose.yml b/docker-compose.yml index a23fbdc..f801e8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,3 +7,10 @@ services: volumes: - .:/package tty: true + package-last: + image: registry.gitlab.com/aplus-framework/images/package:3 + container_name: package-framework-last + working_dir: /package + volumes: + - .:/package + tty: true