-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from devimust/fix-unit-tests
Fix unit tests with docker
- Loading branch information
Showing
18 changed files
with
120 additions
and
2,131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
APP_ENV=local | ||
APP_DEBUG=true | ||
APP_KEY=ZyGTV6G2ajODKPxqxhUJDd31aBp1JmqY | ||
|
||
ADMIN_ENABLED=true | ||
ALLOW_UNSORTED_CATEGORY=true | ||
|
||
DB_DEFAULT=sqlite | ||
DB_DATABASE=test_db | ||
|
||
CACHE_DRIVER=file | ||
SESSION_DRIVER=file | ||
QUEUE_DRIVER=sync | ||
LOCALE=en | ||
LOCALE_FALLBACK=en | ||
|
||
ENABLE_REGISTER=true | ||
ENABLE_REGISTER_MAIL=false | ||
|
||
ENABLE_ADMIN_MAIL=false | ||
|
||
MAIL_HOST=PLEASESETME | ||
MAIL_USERNAME=PLEASESETME | ||
MAIL_PASSWORD=PLEASESETME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,33 @@ | ||
language: php | ||
sudo: required | ||
|
||
php: | ||
- '5.6' | ||
services: | ||
- docker | ||
|
||
language: ruby | ||
|
||
env: | ||
- NODE_RELEASE=4.x | ||
- DOCKER_COMPOSE_VERSION: 1.8.1 | ||
|
||
before_install: | ||
- sudo rm -rf ~/.nvm | ||
- curl -sL "https://deb.nodesource.com/setup_${NODE_RELEASE}" | sudo -E bash - | ||
- sudo apt-get install -y nodejs | ||
- sudo apt-get install -y libnotify-bin # fix missing dependency required by gulp-notify | ||
- sudo npm install -g gulp | ||
- sudo rm /usr/local/bin/docker-compose | ||
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose | ||
- chmod +x docker-compose | ||
- sudo mv docker-compose /usr/local/bin | ||
|
||
install: | ||
- npm install | ||
- gulp --production | ||
- cp .env.travis .env | ||
- mysql -e 'create database homestead_test;' | ||
- composer self-update | ||
- composer install --no-interaction | ||
- php artisan key:generate | ||
- php artisan migrate --seed | ||
- php artisan db:seed --class=DummyBookmarksSeeder | ||
# - php -S localhost:8000 -t public/ | ||
- cp .env.docker .env | ||
- cp docker-compose.sample.yml docker-compose.yml | ||
- docker-compose stop | ||
- docker-compose rm -f | ||
- docker-compose build | ||
|
||
script: | ||
- vendor/bin/phpunit | ||
- docker-compose run --rm composer install | ||
- docker-compose run --rm npm install | ||
- docker-compose run --rm gulp --production | ||
- docker-compose run --rm artisan key:generate | ||
- docker-compose run --rm phpunit | ||
- docker-compose up -d | ||
- sleep 10s | ||
- docker-compose run --rm artisan migrate:refresh --seed | ||
- docker-compose run --rm artisan db:seed --class=DummyBookmarksSeeder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Killing everything docker..." | ||
|
||
docker kill $(docker ps -q) | ||
docker rm -f $(docker ps -a -q) | ||
docker rmi -f $(docker images -q) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.