Skip to content

Commit

Permalink
Merge branch 'ci' into 22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jan 21, 2023
2 parents 86f5665 + 0ad0d77 commit bc5ea23
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,17 @@ jobs:

strategy:
fail-fast: true
matrix:
php: ['8.1']

name: PHP ${{ matrix.php }}
name: PHP 8.1

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
php-version: 8.1
tools: composer
coverage: xdebug

Expand All @@ -47,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 @@ -60,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: 30

strategy:
fail-fast: true

name: PHP 8.2 - Last

steps:
- name: Checkout
uses: actions/checkout@v3

- 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
17 changes: 16 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ test:php:
- build/
- vendor/
before_script:
- 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 public xml phpmd.xml
- vendor/bin/phpstan analyse -vvv
- vendor/bin/phpstan analyse --xdebug -vvv
- vendor/bin/phpunit --colors=never
- phpdoc
artifacts:
Expand All @@ -29,6 +30,20 @@ test:php:
- build/docs/
coverage: '/^\s*Lines:\s*\d+.\d+\%/'

test:php-last:
image: registry.gitlab.com/aplus-framework/images/lempa:3
stage: test
timeout: 30 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
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,15 @@ services:
#environment:
# - PRELOAD=/var/www/aplus/preload.php
tty: true
lempa-last:
image: registry.gitlab.com/aplus-framework/images/lempa:3
container_name: lempa-one-last
working_dir: /var/www/aplus
volumes:
- .:/var/www/aplus
ports:
- "80:80"
- "443:443"
#environment:
# - PRELOAD=/var/www/aplus/preload.php
tty: true

0 comments on commit bc5ea23

Please sign in to comment.