Skip to content

build(deps-dev): bump the version-updates group with 2 updates #525

build(deps-dev): bump the version-updates group with 2 updates

build(deps-dev): bump the version-updates group with 2 updates #525

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ------------------------------------------------------------------------------------
composer-install:
runs-on: ubuntu-24.04
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
steps:
- uses: actions/checkout@v7
- uses: actions/cache@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: zip
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
# ------------------------------------------------------------------------------------
npm-install:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'npm'
- run: npm ci --ignore-scripts
- uses: actions/cache@v6
with:
path: public/build
key: ${{ runner.os }}-public-${{ hashFiles('package-lock.json') }}
- run: npm run build
# ------------------------------------------------------------------------------------
php-linting-psalm:
needs:
- composer-install
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/cache/restore@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
fail-on-cache-miss: true
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Generate _ide_helper file
run: php artisan ide-helper:generate
- name: Static analysis with Psalm
run: vendor/bin/psalm
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
# ------------------------------------------------------------------------------------
php-linting-psr12:
needs:
- composer-install
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/cache/restore@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
fail-on-cache-miss: true
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Coding style PSR12 Check
run: vendor/bin/phpcs
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
# ------------------------------------------------------------------------------------
php-linting-stan:
needs:
- composer-install
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/cache/restore@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
fail-on-cache-miss: true
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Copy .env
run: cp -n .env.example .env
- name: Generate key
run: php artisan key:generate
- name: Static analysis with PHPStan
run: vendor/bin/phpstan analyse
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
# ------------------------------------------------------------------------------------
php-linting-cve:
needs:
- composer-install
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/cache/restore@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
fail-on-cache-miss: true
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Check for known CVE vulnerabilities
run: php artisan security-check:now
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
# ------------------------------------------------------------------------------------
npm-audit:
runs-on: ubuntu-24.04
needs:
- npm-install
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'
- run: npm audit
# ------------------------------------------------------------------------------------
laravel-tests:
needs:
- composer-install
runs-on: ubuntu-24.04
strategy:
max-parallel: 3
matrix:
php-versions: [ '8.3', '8.4' ]
steps:
- uses: actions/checkout@v7
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: xdebug, pgsql
- uses: actions/cache/restore@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
fail-on-cache-miss: true
- name: Copy .env
run: cp -n .env.example .env
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create dist folder and dummy files
run: mkdir -p dist/js && touch dist/js/app.js
- name: Execute tests (Unit and Feature)
run: vendor/bin/phpunit
# ------------------------------------------------------------------------------------
build_and_push_container:
name: Create and publish Docker image to the Github Package Registry
needs:
- php-linting-psalm
- php-linting-psr12
- php-linting-stan
- php-linting-cve
- npm-audit
- laravel-tests
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/cache@v6
with:
path: vendor/
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'
- name: Log in to the Container registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/${{ github.repository }}
- name: Pre-build frontend
run: |
npm ci
npm run build
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}