-
Renovate Bot authoredRenovate Bot authored
.gitlab-ci.yml 3.37 KiB
stages:
- test
- build
- bundle
variables:
APP_ENV: dev
PHPstan:
stage: test
image: composer:2.8.4
before_script:
- composer install --ignore-platform-reqs
script:
- vendor/bin/phpstan analyse --no-progress --error-format gitlab --memory-limit 2G > phpstan.json
artifacts:
when: always
reports:
codequality: phpstan.json
PHPCS:
stage: test
image: composer:2
before_script:
- apk add php-cli composer php-gd php-ctype php-xml php-simplexml php-xmlwriter php-tokenizer php-session php-dom
- composer install
script:
- vendor/bin/phpcs --report=full --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-quality-report.json
artifacts:
reports:
codequality: phpcs-quality-report.json
#Database:
# stage: test
# image: composer:2
# variables:
# MYSQL_ROOT_PASSWORD: root
# services:
# - name: mysql:latest
# alias: mysql
# before_script:
# - apk add php-cli composer php-gd php-ctype php-xml php-simplexml php-xmlwriter php-tokenizer php-session php-dom php-mysqli php-pdo_mysql
# - composer install
# - echo "DATABASE_URL=mysql://root:root@mysql:3306/symfony" > .env.local
# script:
# - /usr/bin/php?? bin/console doctrine:database:create --if-not-exists
# - /usr/bin/php?? bin/console doctrine:migrations:migrate --no-interaction
#TODO: Write Unit tests and enable
#Unit tests:
# stage: test
# image: composer:2.5.7
# variables:
# XDEBUG_MODE: coverage
# before_script:
# - apk add php-cli composer php-gd php-ctype php-xml php-simplexml php-xmlwriter php-tokenizer php-session php-dom php-mysqli php-pdo_mysql
# - apk add php$(ls /usr/bin/php?? | grep -oE [0-9]*)-pecl-xdebug
# - export PHPINI=$(/usr/bin/php?? -i | grep -oE "/etc/php.*/php.ini")
# - echo "zend_extension=xdebug.so" >> $PHPINI
# - composer install
# script:
# - /usr/bin/php?? bin/phpunit --coverage-clover=coverage.xml
# artifacts:
# reports:
# codequality: coverage.xml
Webpack:
stage: build
image: node:lts-alpine