Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
laravel-mongodb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sinan
laravel-mongodb
Commits
27ad5f35
Unverified
Commit
27ad5f35
authored
Feb 16, 2018
by
Thilanga Pitigala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added docker support to travis
parent
7347a87b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
30 deletions
+34
-30
.travis.yml
.travis.yml
+27
-29
docker-compose.yml
docker-compose.yml
+3
-0
Dockerfile
docker/Dockerfile
+4
-0
entrypoint.sh
docker/entrypoint.sh
+0
-1
No files found.
.travis.yml
View file @
27ad5f35
sudo
:
required
dist
:
trusty
language
:
php
language
:
php
php
:
php
:
-
7
-
"
7.1"
-
7.1
-
"
7.0"
matrix
:
fast_finish
:
true
sudo
:
false
services
:
services
:
-
mongodb
-
docker
-
mysql
install
:
addons
:
# Update docker-engine using Ubuntu 'trusty' apt repo
apt
:
-
>
sources
:
curl -sSL "https://get.docker.com/gpg" |
-
mongodb-3.0-precise
sudo -E apt-key add -
packages
:
-
>
-
mongodb-org-server
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
sudo tee -a /etc/apt/sources.list
before_script
:
-
sudo apt-get update
-
pecl install mongodb
-
>
-
mysql -e 'create database unittest;'
sudo apt-get -o Dpkg::Options::="--force-confdef" \
-
travis_retry composer self-update
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
-
travis_retry composer install --no-interaction
-
docker version
script
:
-
mkdir -p build/logs
-
mkdir -p build/logs
-
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
# Update docker-compose via pip
-
sudo pip install docker-compose
-
docker-compose version
-
docker-compose up --build -d
-
docker ps -a
-
docker exec -it php_test composer install --prefer-source --no-interaction
after_success
:
script
:
-
sh -c 'php vendor/bin/coveralls -v'
-
docker exec -it php_test php ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
docker-compose.yml
View file @
27ad5f35
...
@@ -3,6 +3,7 @@ version: '3'
...
@@ -3,6 +3,7 @@ version: '3'
services
:
services
:
php
:
php
:
container_name
:
php_test
build
:
build
:
context
:
.
context
:
.
dockerfile
:
docker/Dockerfile
dockerfile
:
docker/Dockerfile
...
@@ -15,6 +16,7 @@ services:
...
@@ -15,6 +16,7 @@ services:
-
mongodb
-
mongodb
mysql
:
mysql
:
container_name
:
mysql_test
image
:
mysql
image
:
mysql
environment
:
environment
:
MYSQL_ROOT_PASSWORD
:
MYSQL_ROOT_PASSWORD
:
...
@@ -24,6 +26,7 @@ services:
...
@@ -24,6 +26,7 @@ services:
driver
:
none
driver
:
none
mongodb
:
mongodb
:
container_name
:
mongodb_test
image
:
mongo
image
:
mongo
logging
:
logging
:
driver
:
none
driver
:
none
docker/Dockerfile
View file @
27ad5f35
...
@@ -4,3 +4,7 @@ RUN apt-get update && \
...
@@ -4,3 +4,7 @@ RUN apt-get update && \
apt-get
install
-y
autoconf pkg-config libssl-dev
&&
\
apt-get
install
-y
autoconf pkg-config libssl-dev
&&
\
pecl
install
mongodb
&&
docker-php-ext-enable mongodb
&&
\
pecl
install
mongodb
&&
docker-php-ext-enable mongodb
&&
\
docker-php-ext-install
-j
$(
nproc
)
pdo pdo_mysql
docker-php-ext-install
-j
$(
nproc
)
pdo pdo_mysql
RUN
curl
-sS
https://getcomposer.org/installer | php
\
&&
mv
composer.phar /usr/local/bin/
\
&&
ln
-s
/usr/local/bin/composer.phar /usr/local/bin/composer
docker/entrypoint.sh
View file @
27ad5f35
#!/usr/bin/env bash
#!/usr/bin/env bash
sleep
3
&&
php ./vendor/bin/phpunit
sleep
3
&&
php ./vendor/bin/phpunit
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment