Skip to content

Commit

Permalink
Merge branch 'updates' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
natanfelles committed Jan 29, 2023
2 parents c4aaf1c + 1955508 commit 650739e
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 6 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:

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

services:
mariadb:
Expand All @@ -36,16 +34,16 @@ jobs:
ports:
- 6379:6379

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 Down Expand Up @@ -84,4 +82,54 @@ 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

services:
mariadb:
image: mariadb
env:
MYSQL_DATABASE: framework-tests
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

memcached:
image: memcached
ports:
- 11211:11211

redis:
image: redis
ports:
- 6379:6379

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
env:
DB_HOST: 127.0.0.1
MEMCACHED_HOST: 127.0.0.1
REDIS_HOST: 127.0.0.1
run: vendor/bin/phpunit --verbose
22 changes: 22 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ test:php:
MYSQL_DATABASE: framework-tests
MYSQL_ROOT_PASSWORD: password
before_script:
- php -v
- composer update
script:
- composer normalize --dry-run --indent-size=4 --indent-style=space
Expand All @@ -36,6 +37,27 @@ 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/
services:
- mariadb
- memcached
- redis
variables:
MYSQL_DATABASE: framework-tests
MYSQL_ROOT_PASSWORD: password
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
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ services:
depends_on:
- mariadb
tty: true
package-last:
image: registry.gitlab.com/aplus-framework/images/package:3
container_name: package-mvc-last
working_dir: /package
volumes:
- .:/package
depends_on:
- mariadb
tty: true
mariadb:
image: mariadb
restart: always
Expand Down

0 comments on commit 650739e

Please sign in to comment.