add tests
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Philipp Lang 2022-11-24 11:15:43 +01:00
parent 117f53df77
commit 7c28416660
2 changed files with 86 additions and 0 deletions

View File

@ -49,6 +49,28 @@ steps:
commands:
- composer install --ignore-platform-reqs --no-dev
- name: mysql_healthcheck
image: mariadb/server:10.3
commands:
- while ! mysqladmin ping -h db -u db -pdb --silent; do sleep 1; done
- name: migrate
image: php:8.1.6
commands:
- cp .env.testing .env
- php artisan key:generate
- php artisan migrate --database=mysqltest
- name: phpunit_tests
image: php:8.1.6
commands:
- vendor/bin/phpunit
- name: phpstan_tests
image: php:8.1.6
commands:
- vendor/bin/phpstan analyse
- name: node
image: node:17.9.0-slim
commands:
@ -106,6 +128,15 @@ steps:
when:
branch: master
event: push
services:
- name: db
image: mariadb/server:10.3
environment:
MYSQL_DATABASE: db
MYSQL_USER: db
MYSQL_PASSWORD: db
trigger:
event:
- push

55
.env.testing Normal file
View File

@ -0,0 +1,55 @@
APP_NAME=Scoutrobot
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_MODE=
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_TEST_DATABASE=laraveltest
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
XELATEX=
PDFLATEX=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
NAMI_MGLNR=-1
NAMI_GROUP=-1
NAMI_PASSWORD=password
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"