Fix Laravel Pint formatting

This commit is contained in:
root
2026-06-08 22:46:20 -04:00
parent 600cf8d876
commit bd743d57cf
3 changed files with 58 additions and 17 deletions
+58 -17
View File
@@ -41,14 +41,13 @@ cache:
before_script: before_script:
- apt-get update - apt-get update
- apt-get install -y --no-install-recommends git unzip curl libzip-dev libpng-dev libonig-dev libxml2-dev libsqlite3-dev - apt-get install -y --no-install-recommends git unzip curl libzip-dev libpng-dev libonig-dev libxml2-dev libsqlite3-dev
- docker-php-ext-install pdo pdo_sqlite mbstring zip gd - docker-php-ext-install pdo_sqlite mbstring zip gd
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php --install-dir=/usr/local/bin --filename=composer - php composer-setup.php --install-dir=/usr/local/bin --filename=composer
- rm composer-setup.php - rm composer-setup.php
- composer install --prefer-dist --no-interaction --no-progress - composer install --prefer-dist --no-interaction --no-progress
- cp .env.example .env || true
- | - |
cat > .env <<'EOF' cat > .env <<EOF
APP_NAME=school_api APP_NAME=school_api
APP_ENV=testing APP_ENV=testing
APP_KEY= APP_KEY=
@@ -70,7 +69,7 @@ cache:
JWT_SECRET=ci_dummy_secret_not_for_production JWT_SECRET=ci_dummy_secret_not_for_production
EOF EOF
- mkdir -p database storage/framework/cache storage/framework/sessions storage/framework/views bootstrap/cache - mkdir -p database storage/framework/cache storage/framework/sessions storage/framework/views storage/logs bootstrap/cache reports
- touch database/database.sqlite - touch database/database.sqlite
- php artisan key:generate --force - php artisan key:generate --force
- php artisan config:clear - php artisan config:clear
@@ -79,27 +78,47 @@ composer_validate:
extends: .php_laravel_job extends: .php_laravel_job
stage: validate stage: validate
script: script:
- composer validate --strict - mkdir -p reports
- php -v - bash -o pipefail -c 'composer validate --strict 2>&1 | tee reports/composer-validate.log'
- php artisan --version - bash -o pipefail -c 'php -v 2>&1 | tee reports/php-version.log'
- bash -o pipefail -c 'php artisan --version 2>&1 | tee reports/artisan-version.log'
artifacts:
when: always
expire_in: 7 days
paths:
- reports/
- storage/logs/
laravel_pint: laravel_pint:
extends: .php_laravel_job extends: .php_laravel_job
stage: validate stage: validate
script: script:
- vendor/bin/pint --test - mkdir -p reports
- bash -o pipefail -c 'vendor/bin/pint --test 2>&1 | tee reports/pint.log'
artifacts:
when: always
expire_in: 7 days
paths:
- reports/
- storage/logs/
phpunit: phpunit:
extends: .php_laravel_job extends: .php_laravel_job
stage: test stage: test
script: script:
- php artisan migrate --force - mkdir -p reports
- php artisan test --testsuite=Feature --no-interaction - bash -o pipefail -c 'php artisan migrate --force 2>&1 | tee reports/migrate.log'
- php artisan test --testsuite=Unit --no-interaction - bash -o pipefail -c 'php artisan test --testsuite=Feature --no-interaction --log-junit reports/phpunit-feature.xml 2>&1 | tee reports/phpunit-feature.log'
- bash -o pipefail -c 'php artisan test --testsuite=Unit --no-interaction --log-junit reports/phpunit-unit.xml 2>&1 | tee reports/phpunit-unit.log'
artifacts: artifacts:
when: always when: always
expire_in: 7 days expire_in: 7 days
reports:
junit:
- reports/phpunit-feature.xml
- reports/phpunit-unit.xml
paths: paths:
- reports/
- storage/logs/ - storage/logs/
build_frontend: build_frontend:
@@ -108,17 +127,27 @@ build_frontend:
before_script: before_script:
- npm ci - npm ci
script: script:
- npm run build - mkdir -p reports
- sh -c 'npm run build 2>&1 | tee reports/npm-build.log'
artifacts: artifacts:
when: always
expire_in: 7 days expire_in: 7 days
paths: paths:
- public/build/ - public/build/
- reports/
composer_audit: composer_audit:
extends: .php_laravel_job extends: .php_laravel_job
stage: security stage: security
script: script:
- composer audit --locked --no-interaction - mkdir -p reports
- bash -o pipefail -c 'composer audit --locked --no-interaction 2>&1 | tee reports/composer-audit.log'
artifacts:
when: always
expire_in: 7 days
paths:
- reports/
- storage/logs/
npm_audit: npm_audit:
image: node:22-alpine image: node:22-alpine
@@ -126,7 +155,13 @@ npm_audit:
before_script: before_script:
- npm ci - npm ci
script: script:
- npm audit --audit-level=high - mkdir -p reports
- sh -c 'npm audit --audit-level=high 2>&1 | tee reports/npm-audit.log'
artifacts:
when: always
expire_in: 7 days
paths:
- reports/
allow_failure: true allow_failure: true
secret_detection_basic: secret_detection_basic:
@@ -135,15 +170,21 @@ secret_detection_basic:
before_script: before_script:
- apk add --no-cache git grep - apk add --no-cache git grep
script: script:
- mkdir -p reports
- | - |
echo "Scanning for obvious committed secrets..." echo "Scanning for obvious committed secrets..." | tee reports/secret-detection-basic.log
! grep -RInE "(APP_KEY=base64:|DB_PASSWORD=.+|JWT_SECRET=.+|MAIL_PASSWORD=.+|PAYPAL_(CLIENT|SECRET|MODE)|AKIA[0-9A-Z]{16}|-----BEGIN (RSA|OPENSSH|PRIVATE) KEY-----)" \ ! grep -RInE "(APP_KEY=base64:|DB_PASSWORD=.+|JWT_SECRET=.+|MAIL_PASSWORD=.+|PAYPAL_(CLIENT|SECRET|MODE)|AKIA[0-9A-Z]{16}|-----BEGIN (RSA|OPENSSH|PRIVATE) KEY-----)" \
--exclude-dir=.git \ --exclude-dir=.git \
--exclude-dir=vendor \ --exclude-dir=vendor \
--exclude-dir=node_modules \ --exclude-dir=node_modules \
--exclude=.env.example \ --exclude=.env.example \
--exclude=.env.prod.example \ --exclude=.env.prod.example \
. . 2>&1 | tee -a reports/secret-detection-basic.log
artifacts:
when: always
expire_in: 7 days
paths:
- reports/
allow_failure: false allow_failure: false
# Optional GitLab-native security scanners. # Optional GitLab-native security scanners.
@@ -151,4 +192,4 @@ secret_detection_basic:
include: include:
- template: Jobs/SAST.gitlab-ci.yml - template: Jobs/SAST.gitlab-ci.yml
- template: Jobs/Secret-Detection.gitlab-ci.yml - template: Jobs/Secret-Detection.gitlab-ci.yml
- template: Jobs/Dependency-Scanning.gitlab-ci.yml - template: Jobs/Dependency-Scanning.gitlab-ci.yml
Binary file not shown.
Binary file not shown.