forked from gjedeer/celery-php
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
35 lines (30 loc) · 1.15 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
sudo: required
language: php
php:
- "5.4"
- "5.5"
- "5.6"
services:
- rabbitmq
- redis-server
before_install:
- composer --no-interaction validate --strict
# Install PECL amqp package
- sudo apt-get install librabbitmq-dev
- yes '' | pecl install amqp-1.4.0
# RabbitMQ
- sudo rabbitmqctl add_user gdr test
- sudo rabbitmqctl add_vhost celeryamqplib
- sudo rabbitmqctl set_permissions -p celeryamqplib gdr '.*' '.*' '.*'
- sudo rabbitmqctl add_vhost celerypecl
- sudo rabbitmqctl set_permissions -p celerypecl gdr '.*' '.*' '.*'
# Celery
- sudo apt-get install python-virtualenv
- virtualenv -p python3 venv
- venv/bin/pip install -r testscenario/requirements.txt
- venv/bin/celery worker --config celeryamqplibconfig --workdir $PWD/testscenario --detach --pidfile celeryamqplib.pid
- venv/bin/celery worker --config celerypeclconfig --workdir $PWD/testscenario --detach --pidfile celerypecl.pid
- venv/bin/celery worker --config celeryredisconfig --workdir $PWD/testscenario --detach --pidfile celeryredis.pid
install:
- composer --no-interaction install --prefer-dist --no-progress
script: $(composer config bin-dir)/phpunit