1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-25 16:28:11 +00:00

Merge remote-tracking branch 'origin/2.1' into 2.1

This commit is contained in:
grossmj 2017-10-12 23:33:00 +08:00
commit 244a86bcbc
4 changed files with 36 additions and 13 deletions

View File

@ -1,17 +1,15 @@
language: python sudo: required
python:
- '3.4' services:
- '3.5' - docker
- '3.6'
sudo: false
cache: pip
install: install:
- pip install -U setuptools pip - sed -e 's/${PYTHON_VERSION}/'${PYTHON_VERSION}/g DockerfileTests.tpl > /tmp/DockerfileTests
- python setup.py install - docker-compose build
- pip install -rdev-requirements.txt
script: script:
- mkdir ‡ - docker-compose run tests
- py.test -v -s tests --basetemp=‡
deploy: deploy:
provider: pypi provider: pypi
user: noplay user: noplay
@ -20,3 +18,9 @@ deploy:
on: on:
tags: true tags: true
repo: GNS3/gns3-server repo: GNS3/gns3-server
env:
matrix:
- PYTHON_VERSION=3.4
- PYTHON_VERSION=3.5
- PYTHON_VERSION=3.6

15
DockerfileTests.tpl Normal file
View File

@ -0,0 +1,15 @@
FROM python:${PYTHON_VERSION}
RUN pip install -U setuptools pip
ADD requirements.txt /server/requirements.txt
ADD dev-requirements.txt /server/dev-requirements.txt
RUN pip install -r/server/dev-requirements.txt
RUN useradd -ms /bin/bash gns3
USER gns3
ADD . /server
WORKDIR /server

4
docker-compose.yml Normal file
View File

@ -0,0 +1,4 @@
tests:
build: .
dockerfile: /tmp/DockerfileTests
command: py.test -v -s tests

View File

@ -83,7 +83,7 @@ def http_server(request, loop, port_manager, monkeypatch, controller):
for method, route, handler in Route.get_routes(): for method, route, handler in Route.get_routes():
app.router.add_route(method, route, handler) app.router.add_route(method, route, handler)
host = "localhost" host = "127.0.0.1"
# We try multiple time. Because on Travis test can fail when because the port is taken by someone else # We try multiple time. Because on Travis test can fail when because the port is taken by someone else
for i in range(0, 5): for i in range(0, 5):