129 lines
2.8 KiB
YAML
129 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: intl, pdo_pgsql, zip, gd, redis, imagick
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
|
|
- name: Lint Twig
|
|
run: php bin/console lint:twig templates/
|
|
|
|
- name: Lint YAML
|
|
run: php bin/console lint:yaml config/
|
|
|
|
- name: Lint Container
|
|
run: php bin/console lint:container
|
|
|
|
quality-php:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: intl, pdo_pgsql, zip, gd, redis, imagick
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
|
|
- name: PHPStan
|
|
run: vendor/bin/phpstan analyse src/ --level=6 --no-progress
|
|
|
|
- name: PHP CS Fixer
|
|
run: vendor/bin/php-cs-fixer fix --dry-run --diff
|
|
|
|
quality-frontend:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install JS dependencies
|
|
run: bun install
|
|
|
|
- name: ESLint
|
|
run: bunx eslint assets/ --ext .js,.ts
|
|
|
|
- name: Stylelint
|
|
run: bunx stylelint "assets/**/*.scss"
|
|
|
|
security:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
|
|
- name: Install dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
|
|
- name: Security audit
|
|
run: composer audit
|
|
|
|
sonarqube:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: SonarQube Scan
|
|
uses: sonarsource/sonarqube-scan-action@v5
|
|
env:
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
|
SONAR_HOST_URL: https://sn.esy-web.dev
|
|
|
|
build:
|
|
runs_on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Install JS dependencies
|
|
run: bun install
|
|
|
|
- name: Build assets
|
|
run: bun run build
|