mirror of
https://framagit.org/tykayn/date-poll-api
synced 2023-08-25 08:23:11 +02:00
add pipeline gitlab file
This commit is contained in:
parent
d3f3b75252
commit
ca5a77c408
63
.gitlab-ci.yml
Normal file
63
.gitlab-ci.yml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
image: jakzal/phpqa:php7.4
|
||||||
|
|
||||||
|
before_script:
|
||||||
|
- composer install
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- vendor/
|
||||||
|
stages:
|
||||||
|
- SecurityChecker
|
||||||
|
- CodingStandards
|
||||||
|
- UnitTests
|
||||||
|
security-checker:
|
||||||
|
stage: SecurityChecker
|
||||||
|
script:
|
||||||
|
- security-checker security:check composer.lock
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
phpcs:
|
||||||
|
stage: CodingStandards
|
||||||
|
script:
|
||||||
|
- phpcs -v --standard=PSR12 --ignore=./src/Kernel.php ./src
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
phpstan:
|
||||||
|
stage: CodingStandards
|
||||||
|
script:
|
||||||
|
- phpstan analyse ./src
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
twig-lint:
|
||||||
|
stage: CodingStandards
|
||||||
|
script:
|
||||||
|
- twig-lint lint ./templates
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
phpunit:
|
||||||
|
stage: UnitTests
|
||||||
|
script:
|
||||||
|
- php bin/phpunit
|
||||||
|
allow_failure: false
|
||||||
|
|
||||||
|
phpunit:
|
||||||
|
image: php:7.4-apache
|
||||||
|
stage: UnitTests
|
||||||
|
services:
|
||||||
|
- name: mysql:5.7
|
||||||
|
alias: mysql
|
||||||
|
variables:
|
||||||
|
MYSQL_ROOT_PASSWORD: pass_test
|
||||||
|
MYSQL_DATABASE: myapptest
|
||||||
|
MYSQL_USER: myapptest
|
||||||
|
MYSQL_PASSWORD: myapptest
|
||||||
|
DATABASE_URL: 'mysql://myapptest:myapptest@mysql:3306/myapptest'
|
||||||
|
before_script:
|
||||||
|
- apt-get update && apt-get install -y git libzip-dev
|
||||||
|
- curl -sSk https://getcomposer.org/installer | php -- --disable-tls && mv composer.phar /usr/local/bin/composer
|
||||||
|
- docker-php-ext-install mysqli pdo pdo_mysql zip
|
||||||
|
- php bin/console doctrine:database:drop --force --env=test
|
||||||
|
- php bin/console doctrine:database:create --env=test
|
||||||
|
- php bin/console doctrine:migration:migrate --env=test --no-interaction
|
||||||
|
script:
|
||||||
|
- php bin/phpunit
|
||||||
|
allow_failure: true
|
Loading…
Reference in New Issue
Block a user