Skip to content

chore(deps-dev): bump phpunit/phpunit from 11.5.2 to 11.5.3 in the dev group #246

chore(deps-dev): bump phpunit/phpunit from 11.5.2 to 11.5.3 in the dev group

chore(deps-dev): bump phpunit/phpunit from 11.5.2 to 11.5.3 in the dev group #246

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
workflow_dispatch:
inputs:
coverage:
description: "Run with coverage tests"
required: false
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
PHP_VERSION: 8.3
PHP_EXTENSIONS: mbstring,pdo,xml,ctype,fileinfo,json,curl,openssl,dom,zip
PHP_INI_PROPERTIES: post_max_size=256M,upload_max_filesize=256M
jobs:
setup:
name: Setup PHP
runs-on: ubuntu-24.04
outputs:
combined-key: ${{ steps.prepare-env.outputs.combined-key }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Prepare environment and composer data
id: prepare-env
run: |
composer_dir=$(composer config cache-files-dir)
composer_hash=${{ hashFiles('**/composer.lock') }}
os_lower=$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]')
arch_lower=$(echo ${{ runner.arch }} | tr '[:upper:]' '[:lower:]')
combined_key="${os_lower}-${arch_lower}-composer-${composer_hash}"
echo "combined-key=${combined_key}" >> "$GITHUB_OUTPUT"
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: ${{ env.PHP_VERSION }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_PROPERTIES }}
- name: Install composer dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
custom-cache-key: ${{ steps.prepare-env.outputs.combined-key }}
format:
name: Perform Pint format
runs-on: ubuntu-24.04
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: ${{ env.PHP_VERSION }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_PROPERTIES }}
- name: Install composer dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
custom-cache-key: ${{ needs.setup.outputs.combined-key }}
- name: Run Pint
run: ./vendor/bin/pint --no-interaction --test --preset=laravel
tests:
name: Run tests
runs-on: ubuntu-24.04
needs: setup
env:
BROADCAST_DRIVER: log
CACHE_DRIVER: redis
QUEUE_CONNECTION: redis
SESSION_DRIVER: redis
DB_CONNECTION: pgsql
DB_HOST: localhost
DB_PASSWORD: postgres
DB_USERNAME: postgres
DB_DATABASE: postgres
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: app
ports:
- 5432/tcp
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379/tcp
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0
with:
php-version: ${{ env.PHP_VERSION }}
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_PROPERTIES }}
coverage: "xdebug"
- name: Install composer dependencies
uses: ramsey/composer-install@57532f8be5bda426838819c5ee9afb8af389d51a # v3.0.0
with:
composer-options: "--optimize-autoloader --prefer-dist"
custom-cache-key: ${{ needs.setup.outputs.combined-key }}
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan config:clear
php artisan key:generate
- name: Run Migration
run: php artisan migrate --seed -v
env:
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Run tests
run: php artisan test
env:
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Run coverage tests
if: github.event_name == 'workflow_dispatch' && github.event.inputs.coverage == 'true'
run: php artisan test --coverage --min=90
env:
DB_PORT: ${{ job.services.postgres.ports['5432'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
deploy:
name: Deploy on Forge
if: >
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
github.actor != 'dependabot[bot]' &&
github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-24.04
environment: ${{ github.ref_name == 'develop' && 'develop' || github.ref_name == 'main' && 'production' || null }}
needs:
- tests
- format
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get the latest commit message
id: get_commit_message
run: |
echo "message=$(git log -1 --pretty=%s)" >> "$GITHUB_OUTPUT"
- name: Print GitHub Context
run: |
echo "### GitHub Context ###"
echo "Event Name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref_name }} | ${{ github.ref }}"
echo "Commit title: ${{ steps.get_commit_message.outputs.message }}"
echo "Commit Hash: ${{ github.sha }}"
echo "Actor: ${{ github.actor }}"
- name: Trigger Deployment on Laravel Forge
uses: ./.github/actions/deploy-forge
with:
forge_server_id: ${{ secrets.FORGE_SERVER_ID }}
forge_site_id: ${{ secrets.FORGE_SITE_ID }}
forge_api_token: ${{ secrets.FORGE_DEPLOY_TOKEN }}
branch: ${{ github.ref_name }}
commit_sha: ${{ github.sha }}
commit_author: ${{ github.actor }}
commit_message: ${{ steps.get_commit_message.outputs.message }}
- name: Wait for deployment to complete
uses: ./.github/actions/wait-deploy
with:
forge_server_id: ${{ secrets.FORGE_SERVER_ID }}
forge_site_id: ${{ secrets.FORGE_SITE_ID }}
forge_api_token: ${{ secrets.FORGE_API_TOKEN }}
commit_sha: ${{ github.sha }}