-
Yassine Doghri authoredYassine Doghri authored
.gitlab-ci.yml 3.76 KiB
image: code.castopod.org:5050/adaures/castopod:ci-php8.3
stages:
- prepare
- quality
- bundle
- release
- deploy
- build
php-dependencies:
stage: prepare
script:
# Install all php dependencies
- composer install --prefer-dist --no-ansi --no-interaction --no-progress --ignore-platform-reqs
cache:
key:
files:
- composer.lock
paths:
- .composer-cache
artifacts:
expire_in: 30 mins
paths:
- vendor/
js-dependencies:
stage: prepare
script:
# Install all js dependencies
- pnpm install
cache:
key:
files:
- pnpm-lock.yaml
paths:
- .pnpm-store
artifacts:
expire_in: 30 mins
paths:
- node_modules/
lint-commit-msg:
stage: quality
script:
- chmod +x ./scripts/lint-commit-msg.sh
# lint commit message
- ./scripts/lint-commit-msg.sh
dependencies:
- js-dependencies
only:
- develop
- main
- beta
- alpha
lint-php:
stage: quality
script:
# check php code style
- vendor/bin/ecs check --ansi
# phpstan - increase memory limit to 1GB to prevent script failure
- php -d memory_limit=1G vendor/bin/phpstan analyse --ansi
# run rector to check for php errors
- vendor/bin/rector process --dry-run --ansi
dependencies:
- php-dependencies
lint-js:
stage: quality