build(deps): bump the minor group in /frontend with 21 updates #457
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Code quality" | |
on: | |
workflow_call: | |
pull_request: | |
push: | |
branches: | |
- main | |
env: | |
DATABASE_HOST: 127.0.0.1 | |
jobs: | |
backend-code-quality: | |
name: Backend code quality checks | |
runs-on: ubuntu-24.04 | |
services: | |
database: | |
image: mariadb:10.6 | |
env: | |
MARIADB_RANDOM_ROOT_PASSWORD: yes | |
MARIADB_USER: expensave | |
MARIADB_PASSWORD: expensave | |
MARIADB_DATABASE: expensave_test | |
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: 'backend/' | |
sparse-checkout-cone-mode: false | |
- name: Move backend to root | |
run: | | |
shopt -s dotglob | |
mv backend/* ./ | |
rm -rf backend/ | |
mkdir -p ./var/cache | |
mkdir -p ./var/log | |
chmod 775 ./var/cache | |
chmod 775 ./var/log | |
php -v | |
- name: Packages install | |
uses: php-actions/composer@v6 | |
with: | |
args: --profile --ignore-platform-reqs | |
# - name: Run PHPCS | |
# uses: php-actions/phpcs@v1 | |
# with: | |
# path: ./src/ | |
# args: -d memory_limit=-1 | |
- name: Warmup cache for PHPStan | |
run: php bin/console cache:warmup -n --env=dev | |
- name: Run PHPStan | |
uses: php-actions/phpstan@v3 | |
env: | |
APP_ENV: dev | |
with: | |
php_version: 8.3 | |
path: 'src/' | |
- name: Create schema for testing | |
run: php bin/console doctrine:schema:create -n --env=test | |
- name: Run PHPUnit | |
uses: php-actions/phpunit@v4 | |
env: | |
XDEBUG_MODE: coverage | |
with: | |
php_version: 8.3 | |
php_extensions: xdebug pdo pdo_mysql | |
coverage_clover: coverage.xml | |
log_junit: report.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
frontend-code-quality: | |
name: Frontend code quality checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: 'frontend/' | |
sparse-checkout-cone-mode: false | |
- name: Move frontend to root | |
run: | | |
shopt -s dotglob | |
mv frontend/* ./ | |
rm -rf frontend/ | |
ls -lah | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Packages Install | |
run: npm ci | |
- name: Run ESLint | |
run: npm run analyze |