Skip to content

Xdebug activate

Xdebug activate #2

Workflow file for this run

name: GitHub Action
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Build Docker containers
- name: Build containers
run: docker compose -f docker-compose.dev.yml up -d --force-recreate --build
# Application configuration
- name: Configure application
run: |
docker exec -i local /bin/bash -c 'composer update'
docker exec -i local /bin/bash -c '/usr/local/bin/php artisan config:clear'
docker exec -i local /bin/bash -c '/usr/local/bin/php artisan cache:clear'
docker exec -i local /bin/bash -c '/usr/local/bin/php artisan view:clear'
docker exec -i local /bin/bash -c '/usr/local/bin/php artisan DBConnection'
docker exec -i local /bin/bash -c '/usr/local/bin/php artisan migrate'
env:
# Add any environment variables here if needed
APP_ENV: testing
# Run PHPUnit tests
- name: Run PHPUnit tests
run: docker exec -i local /bin/bash -c '/usr/local/bin/php artisan test'
# Run Larastan static analysis
- name: Larastan analysis
run: docker exec -i local /bin/bash -c './vendor/bin/phpstan analyse --generate-baseline --memory-limit=2G'
# Cleanup after the job
- name: Cleanup resources
run: |
docker compose -f docker-compose.dev.yml down
docker volume prune -f
docker image prune -f