Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cypress.yml #117

Merged
merged 18 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .env.cypress
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
APP_NAME=notaR
APP_ENV=local
APP_KEY=
APP_DEBUG=false
APP_URL=http://localhost:8000
APP_SCHEME=http
APP_SERVICE=app
APP_TIMEZONE='America/Sao_Paulo'

LOG_CHANNEL=silent
LOG_LEVEL=none

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=notaR
DB_USERNAME=notaR
DB_PASSWORD=password

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MAIL_MAILER=smtp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"

WWWUSER=1000
WWWGROUP=1000
18 changes: 11 additions & 7 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
name: Laravel-Docker-Cypress
name: Cypress

on:
pull_request:
branches: [ "main" ]

jobs:
laravel-tests:

permissions:
contents: write
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
run: php -r "file_exists('.env') || copy('.env.cypress', '.env');"
- name: Install
run: ./deploy.sh
- name: Generate key
run: docker exec notar_app_1 php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: docker exec -t notar_app_1 php artisan migrate
- name: Execute tests
run: npx cypress run
- name: Create admin user
run: docker exec -t notar_app_1 php artisan migrate:admin novasenha
- name: Cypress run
uses: cypress-io/github-action@v6
with:
config-file: cypress.config.js
5 changes: 5 additions & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],

'silent' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
],

];
Loading