Skip to content

fix dependencies

fix dependencies #9

Workflow file for this run

name: Pipeline
on:
push:
branches:
- develop
jobs:
ci:
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['8.1', '8.2', '8.3']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, pdo_sqlite
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader || composer update --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Clear Config
run: php artisan config:clear
- name: Create Database
run: touch database/database.sqlite
- name: Migrate Database
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: php artisan migrate
- name: Test with phpunit
run: vendor/bin/phpunit --testdox
deploy-develop:
name: Deploy to dev Enviroment
runs-on: ubuntu-latest
needs: ci
environment:
name: develop
url: pipelinedevelop.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to develop environment"
deploy-homologacao:
name: Deploy to hmg Enviroment
runs-on: ubuntu-latest
needs: deploy-develop
environment:
name: homologacao
url: pipelinehomologacao.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to homologacao environment"
deploy-producao:
name: Deploy to prod Enviroment
runs-on: ubuntu-latest
needs: deploy-homologacao
environment:
name: production
url: pipeline.phppiaui.com.br
steps:
- name: Deploy
run: echo "Deploying to production environment"