Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
31 changes: 22 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ LOG_CHANNEL=stack
LOG_LEVEL=debug

# Banco de dados local da aplicação
DB_CONNECTION=mysql
DB_HOST=localhost
DB_CONNECTION=mariadb
DB_HOST=mariadb
DB_PORT=3306
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_DATABASE=empresta
DB_USERNAME=empresta
DB_PASSWORD=empresta

# LARAVEL TOOLS #########################################
# https://github.com/uspdev/laravel-tools
Expand Down Expand Up @@ -78,9 +78,13 @@ USP_THEME_SKIN=uspdev

# SENHAUNICA-SOCIALITE ######################################
# https://github.com/uspdev/senhaunica-socialite
SENHAUNICA_KEY=
SENHAUNICA_SECRET=
SENHAUNICA_CALLBACK_ID=
SENHAUNICA_KEY=faker
SENHAUNICA_SECRET=faker
SENHAUNICA_CALLBACK_ID=1
SENHAUNICA_ADMINS=1111,2222
SENHAUNICA_DEV="http://auth.local:3141/wsusuario/oauth"
ADMINS=1111,2222


# URL do servidor oauth no ambiente de dev (default: no)
#SENHAUNICA_DEV="https://dev.uspdigital.usp.br/wsusuario/oauth"
Expand Down Expand Up @@ -110,6 +114,9 @@ REPLICADO_PORT=
REPLICADO_DATABASE=
REPLICADO_USERNAME=
REPLICADO_PASSWORD=
# Desliga ou liga consultas ao replicado, mesmo que ele exista no composer.json (default = true)
SENHAUNICA_USAR_REPLICADO=false
REPLICADO_FAKE=1

# Em alguns métodos é necessário informar o código da unidade. Se houver mais de um código coloque eles separado por vírgulas.
REPLICADO_CODUNDCLG=
Expand Down Expand Up @@ -151,4 +158,10 @@ WSFOTO_DISABLE=0
#MULTIPLOS_MATERIAIS=true

# Habilita a tecla Enter para submeter o fomulário de empréstimo de material. default=0
#HABILITAR_ENTER=1
#HABILITAR_ENTER=1

# Dusk
APP_URL=http://empresta
DUSK_DRIVER_URL='http://selenium:4444/wd/hub'
DUSK_START_MAXIMIZED=true
DUSK_HEADLESS_DISABLED=true
7 changes: 7 additions & 0 deletions .github/workflows/dusk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ jobs:
--health-interval=5s
--health-timeout=5s
--health-retries=10
senhaunica-faker:
image: uspdev/senhaunica-faker
env:
APP_URL: http://127.0.0.1:3141
ports:
- 3141:3141

steps:
- name: Checkout
Expand Down Expand Up @@ -60,6 +66,7 @@ jobs:
echo "DB_DATABASE=db" >> .env
echo "DB_USERNAME=admin" >> .env
echo "DB_PASSWORD=admin" >> .env
echo "SENHAUNICA_DEV=http://127.0.0.1:3141/wsusuario/oauth" >> .env

- name: Generate APP_KEY
run: php artisan key:generate
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ yarn-error.log
.lando.yml
Dockerfile.custom
php.ini
.phpunit.cache/test-results
.phpunit.cache/test-results
.phpunit.cache/test-results
.phpunit.cache/test-results
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":2,"defects":{"Tests\\Browser\\ExampleTest::test_basic_example":8,"Tests\\Browser\\IndexTest::test_example":8,"Tests\\Browser\\LoginTest::test_login":8,"Tests\\Browser\\CategoriaCrudTest::test_Categoria":8,"Tests\\Browser\\MaterialCrudTest::test_Material":8,"Tests\\Browser\\UsuarioCrudTest::test_Usuario":8,"Tests\\Browser\\VisitanteCrudTest::test_Visitante":8},"times":{"Tests\\Browser\\ExampleTest::test_basic_example":0.221,"Tests\\Browser\\IndexTest::test_example":0.641,"Tests\\Browser\\LoginTest::test_login":4.625,"Tests\\Browser\\CategoriaCrudTest::test_Categoria":3.457,"Tests\\Browser\\MaterialCrudTest::test_Material":4.035,"Tests\\Browser\\UsuarioCrudTest::test_Usuario":3.505,"Tests\\Browser\\VisitanteCrudTest::test_Visitante":3.678}}
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM uspdev/uspdev-php-apache:8.4

RUN sed -i 's|/var/www/html|/var/www/html/public|' \
/etc/apache2/sites-available/000-default.conf

USER www-data

COPY --chown=www-data . .

RUN composer install \
--no-dev \
--optimize-autoloader \
--no-interaction

CMD ["apache2-foreground"]
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
"uspdev/wsfoto": "^2.0"
},
"require-dev": {
"spatie/laravel-ignition": "^2.0",
"fakerphp/faker": "^1.9.1",
"laravel/dusk": "^8.6",
"laravel/sail": "^1.0.1",
"lucascudo/laravel-pt-br-localization": "^1.2",
"mockery/mockery": "^1.4.2",
"nunomaduro/collision": "^8.1",
"phpunit/phpunit": "^11.0"
"phpunit/phpunit": "^11.0",
"spatie/laravel-ignition": "^2.0"
},
"config": {
"optimize-autoloader": true,
Expand Down
Loading
Loading