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
1ed686d6
Commit
1ed686d6
authored
Feb 19, 2018
by
Remi Collin
Browse files
Options
Browse Files
Download
Plain Diff
Fix travis
parents
ea064548
9d5398b1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
50 deletions
+54
-50
.travis.yml
.travis.yml
+26
-45
docker-compose.yml
docker-compose.yml
+3
-0
Dockerfile
docker/Dockerfile
+11
-3
entrypoint.sh
docker/entrypoint.sh
+1
-1
MongoQueue.php
src/Jenssegers/Mongodb/Queue/MongoQueue.php
+1
-1
Builder.php
src/Jenssegers/Mongodb/Schema/Builder.php
+12
-0
No files found.
.travis.yml
View file @
1ed686d6
sudo
:
required
dist
:
trusty
language
:
php
php
:
-
7.1
-
7.2
env
:
global
:
-
DRIVER_VERSION="stable"
-
ADAPTER_VERSION="^1.0.0"
sudo
:
true
-
"
7.2"
-
"
7.1"
services
:
-
mongodb
-
mysql
matrix
:
fast_finish
:
true
include
:
-
php
:
7.1
addons
:
apt
:
sources
:
-
sourceline
:
"
deb
[arch=amd64]
https://repo.mongodb.org/apt/ubuntu
trusty/mongodb-org/3.4
multiverse"
key_url
:
"
https://www.mongodb.org/static/pgp/server-3.4.asc"
-
"
mongodb-upstart"
packages
:
[
'
mongodb-org-server'
]
-
php
:
7.2
addons
:
apt
:
sources
:
-
sourceline
:
"
deb
[arch=amd64]
https://repo.mongodb.org/apt/ubuntu
trusty/mongodb-org/3.4
multiverse"
key_url
:
"
https://www.mongodb.org/static/pgp/server-3.4.asc"
-
"
mongodb-upstart"
packages
:
[
'
mongodb-org-server'
]
before_script
:
-
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then pecl install -f mongodb-${DRIVER_VERSION}; fi
-
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then composer config "platform.ext-mongo" "1.6.16" && composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}"; fi
-
mysql -e 'create database unittest;'
-
service mongod start
-
travis_retry composer self-update
-
travis_retry composer install --no-interaction
-
docker
install
:
# Update docker-engine using Ubuntu 'trusty' apt repo
-
>
curl -sSL "https://get.docker.com/gpg" |
sudo -E apt-key add -
-
>
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
sudo tee -a /etc/apt/sources.list
-
sudo apt-get update
-
>
sudo apt-get -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
-
docker version
# Update docker-compose via pip
-
sudo pip install docker-compose
-
docker-compose version
-
docker-compose up --build -d
-
docker ps -a
script
:
-
mkdir -p build/logs
-
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
after_success
:
-
sh -c 'php vendor/bin/coveralls -v'
-
docker-compose up --exit-code-from php
docker-compose.yml
View file @
1ed686d6
...
...
@@ -3,6 +3,7 @@ version: '3'
services
:
php
:
container_name
:
php
build
:
context
:
.
dockerfile
:
docker/Dockerfile
...
...
@@ -15,6 +16,7 @@ services:
-
mongodb
mysql
:
container_name
:
mysql
image
:
mysql
environment
:
MYSQL_ROOT_PASSWORD
:
...
...
@@ -24,6 +26,7 @@ services:
driver
:
none
mongodb
:
container_name
:
mongodb
image
:
mongo
logging
:
driver
:
none
docker/Dockerfile
View file @
1ed686d6
FROM
php:7.1-cli
RUN
pecl
install
xdebug
RUN
apt-get update
&&
\
apt-get
install
-y
autoconf pkg-config libssl-dev
&&
\
pecl
install
mongodb
&&
docker-php-ext-enable mongodb
&&
\
docker-php-ext-install
-j
$(
nproc
)
pdo pdo_mysql
apt-get
install
-y
autoconf pkg-config libssl-dev git
&&
\
pecl
install
mongodb git zlib1g-dev
&&
docker-php-ext-enable mongodb
&&
\
docker-php-ext-install
-j
$(
nproc
)
pdo pdo_mysql zip
&&
docker-php-ext-enable xdebug
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
ENV
PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
\ No newline at end of file
docker/entrypoint.sh
View file @
1ed686d6
#!/usr/bin/env bash
sleep
3
&&
php ./vendor/bin/phpunit
sleep
3
&&
composer
install
--prefer-source
--no-interaction
&&
php ./vendor/bin/phpunit
src/Jenssegers/Mongodb/Queue/MongoQueue.php
View file @
1ed686d6
...
...
@@ -117,7 +117,7 @@ class MongoQueue extends DatabaseQueue
})
->
get
();
foreach
(
$reserved
as
$job
)
{
$attempts
=
$job
[
'attempts'
];
$attempts
=
$job
[
'attempts'
]
+
1
;
$this
->
releaseJob
(
$job
[
'_id'
],
$attempts
);
}
}
...
...
src/Jenssegers/Mongodb/Schema/Builder.php
View file @
1ed686d6
...
...
@@ -96,6 +96,18 @@ class Builder extends \Illuminate\Database\Schema\Builder
}
}
/**
* @inheritdoc
*/
public
function
dropIfExists
(
$collection
)
{
if
(
$this
->
hasCollection
(
$collection
))
{
return
$this
->
drop
(
$collection
);
}
return
false
;
}
/**
* @inheritdoc
*/
...
...
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