Skip to content

Commit

Permalink
Merge branch 'php-last' into 22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Dec 21, 2022
2 parents e6be625 + 9b6a25d commit bc600ad
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 8 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand All @@ -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
21 changes: 19 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bc600ad

Please sign in to comment.