You've already forked Atomcms-edit
chore: add GitLab CI/CD pipeline with PHPStan, Pint, and PHPUnit
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
stages:
|
||||
- validate
|
||||
- test
|
||||
|
||||
variables:
|
||||
COMPOSER_ALLOW_SUPERUSER: "1"
|
||||
|
||||
cache:
|
||||
key: ${CI_COMMIT_REF_SLUG}
|
||||
paths:
|
||||
- vendor/
|
||||
- node_modules/
|
||||
|
||||
.php-base:
|
||||
image: edgd1er/phpnt:8.4-laravel
|
||||
before_script:
|
||||
- apt-get update && apt-get install -y git unzip libpng-dev libjpeg-dev libfreetype6-dev 2>/dev/null || true
|
||||
- docker-php-ext-install bcmath pdo_mysql gd 2>/dev/null || true
|
||||
- cp .env.example .env || true
|
||||
- composer install --prefer-dist --no-progress --no-interaction 2>&1
|
||||
|
||||
validate:phpstan:
|
||||
stage: validate
|
||||
extends: .php-base
|
||||
script:
|
||||
- vendor/bin/phpstan analyse --no-progress
|
||||
allow_failure: false
|
||||
|
||||
validate:pint:
|
||||
stage: validate
|
||||
extends: .php-base
|
||||
script:
|
||||
- vendor/bin/pint --test
|
||||
allow_failure: false
|
||||
|
||||
test:phpunit:
|
||||
stage: test
|
||||
extends: .php-base
|
||||
script:
|
||||
- php artisan key:generate --force
|
||||
- vendor/bin/phpunit --log-junit junit.xml
|
||||
artifacts:
|
||||
reports:
|
||||
junit: junit.xml
|
||||
paths:
|
||||
- junit.xml
|
||||
when: always
|
||||
allow_failure: false
|
||||
Reference in New Issue
Block a user