From e6be62568e24014fa38479673c50d0e5202b0212 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 21 Dec 2022 18:29:50 -0300 Subject: [PATCH 1/5] Upgrade http and validation libraries --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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": "*", From 89fbe7bb12ba74db7caa6526135778153df33e2f Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 21 Dec 2022 18:48:41 -0300 Subject: [PATCH 2/5] Update CI tests on GitLab --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc7bbe6..b6bcef2 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: @@ -30,6 +32,7 @@ test:php: pages: stage: deploy + timeout: 10 minutes dependencies: - test:php environment: From affc4ed80a092b274c59084e9d0731d238292b69 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 21 Dec 2022 18:49:33 -0300 Subject: [PATCH 3/5] Add job to test latest PHP version --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6bcef2..4d6dfa6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,20 @@ 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 From 9b85a825e449a65c07391601b08d74f8924845ff Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 21 Dec 2022 18:51:26 -0300 Subject: [PATCH 4/5] Update tests on GitHub Actions --- .github/workflows/tests.yml | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) 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 From 9b6a25d6a2aed19bc6574916cc946e0d3634a069 Mon Sep 17 00:00:00 2001 From: Natan Felles Date: Wed, 21 Dec 2022 18:52:53 -0300 Subject: [PATCH 5/5] Add package-last service --- docker-compose.yml | 7 +++++++ 1 file changed, 7 insertions(+) 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