mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
clean reset setting for gitlab ci
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
APP_ENV=testing
|
||||
APP_DEBUG=true
|
||||
APP_KEY=base64:Owaz/+O4RzKLOptjD28yfP1KeTiqsPOVgOPjP8/ZWIE=
|
||||
APP_URL=http://localhost
|
||||
CACHE_DRIVER=array
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=mysql
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=default
|
||||
DB_USERNAME=default
|
||||
DB_PASSWORD=secret
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Install dependencies only for Docker.
|
||||
[[ ! -e /.dockerenv ]] && exit 0
|
||||
set -xe
|
||||
|
||||
# Update packages and install composer and PHP dependencies.
|
||||
apt-get update -yqq
|
||||
apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq
|
||||
|
||||
# Compile PHP, include these extensions.
|
||||
docker-php-ext-install mbstring pdo_mysql curl json intl gd xml zip bz2 opcache
|
||||
|
||||
# Install Composer and project dependencies.
|
||||
curl -sS https://getcomposer.org/installer | php
|
||||
php composer.phar install
|
||||
|
||||
# Copy over testing configuration.
|
||||
cp .env.testing .env
|
||||
|
||||
# Install xdebug
|
||||
pecl install xdebug && docker-php-ext-enable xdebug
|
||||
|
||||
# Generate an application key. Re-cache.
|
||||
php artisan key:generate
|
||||
php artisan config:cache
|
||||
php artisan config:clear
|
||||
# php artisan optimize // remove after laravel 5.6
|
||||
|
||||
# Run database migrations with seeder
|
||||
php artisan migrate:refresh --seed
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
before_script:
|
||||
- bash .gitlab-ci.sh
|
||||
stages:
|
||||
- testing
|
||||
- staging
|
||||
variables:
|
||||
MYSQL_DATABASE: default
|
||||
MYSQL_USER: default
|
||||
MYSQL_PASSWORD: secret
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
unitTesting:
|
||||
stage: testing
|
||||
image: php:7.2.6
|
||||
services:
|
||||
- mysql:5.7
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-text --colors=never --configuration phpunit.xml
|
||||
Reference in New Issue
Block a user