Commit f5e5ec5a authored by Xavier Barbosa's avatar Xavier Barbosa

ci love

parent 347d1100
Pipeline #477 passed with stages
---
before_script:
- apk add --no-cache snappy-dev
- >
curl -O https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.3.6.linux-amd64.go1.5.1.tar.gz
&& tar zxvf nsq-0.3.6.linux-amd64.go1.5.1.tar.gz
- python -m pip install -e .
- python -m pip install -r requirements-test.txt
- python -m pip install python-snappy
cache:
paths:
- nsq-0.3.6.linux-amd64.go1.5.1
Prepare container:
stage: build
script:
- docker build -t errorist/aionsq:latest .
tags:
- docker-build
tests:
Test:
stage: test
image: errorist/aionsq:latest
script:
- echo $PATH
- export PATH=$PATH:$PWD/nsq-0.3.6.linux-amd64.go1.5.1/bin
- py.test --cov aionsq --cov-report term-missing tests/
- python -m pip install -e .
- python -m pip install -r requirements-test.txt
- py.test tests/ --cov aionsq --cov-report term-missing --flake8
tags:
- python3.5
FROM errorist/py:3.5
MAINTAINER Xavier Barbosa <clint.northwood@gmail.com>
ENV NSQ_VERSION=0.3.6
ENV GOLANG_VERSION=1.5.1
ENV NSQ_PACKAGE=nsq-${NSQ_VERSION}.linux-amd64.go${GOLANG_VERSION}
RUN apk add --no-cache curl python3-dev snappy-dev tar
RUN mkdir -p /usr/local/bin
RUN curl -O https://s3.amazonaws.com/bitly-downloads/nsq/${NSQ_PACKAGE}.tar.gz
RUN tar zxvf ${NSQ_PACKAGE}.tar.gz -C /usr/local/bin --strip-components 2 --owner=0
RUN python -m pip install python-snappy
......@@ -6,7 +6,7 @@ import sys
import logging
import warnings
from pytest import fixture
from subprocess import Popen
from subprocess import Popen, PIPE
from time import sleep
os.environ['PYTHONASYNCIODEBUG'] = '1'
......@@ -35,14 +35,6 @@ for f in filelist:
os.remove(os.path.join(database_dir, f))
class SubLog:
def __init__(self):
self.log = logging.getLogger(__name__)
def write(self, data, *args):
self.log.info(data)
class Service:
def __init__(self, *cmd, name=None, cwd=None):
......@@ -55,7 +47,6 @@ class Service:
env = os.environ.copy()
env.setdefault('GOMAXPROCS', '2')
self.log = open(filepath('_.log'), 'a')
# subl = SubLog()
proc = Popen(self.cmd,
env=env,
cwd=self.cwd,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment