Merge branch 'gitlab-ci'

master
Justin Riley 2016-10-11 23:46:09 -04:00
commit c06c7bbbce
6 changed files with 41 additions and 3 deletions

19
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,19 @@
image: python:2.7.12-slim
before_script:
- bash ci-scripts/before.sh
variables:
COVERAGE_FILE: .coverage
ONE_AUTH: "/tmp/test-one-auth"
ONE_XMLRPC: "http://localhost:2633/RPC2"
pytest:
stage: test
script:
- python setup.py test
tags:
- docker
after_script:
- bash ci-scripts/after.sh

View File

@ -1,4 +1,8 @@
# OneDNS
[![build status](https://gitlab-int.rc.fas.harvard.edu/ops/one-dns/badges/master/build.svg)](https://gitlab-int.rc.fas.harvard.edu/ops/one-dns/commits/master)
[![coverage report](https://gitlab-int.rc.fas.harvard.edu/ops/one-dns/badges/master/coverage.svg)](https://gitlab-int.rc.fas.harvard.edu/ops/one-dns/commits/master)
Dyanmic DNS for OpenNebula
## Usage

2
ci-scripts/after.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/bash
coverage report

5
ci-scripts/before.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
echo 'someuser:sometoken' > ${ONE_AUTH}
pip install -r requirements.txt
pip install -r test-requirements.txt
coverage erase

View File

@ -29,9 +29,9 @@ setup(
'pytest-runner>=2.9'
],
tests_require=[
"pytest>=2.9.2",
"pytest-cov>=2.3.0",
"pytest-flake8>=0.6",
"pytest>=3.0.3",
"pytest-cov>=2.4.0",
"pytest-flake8>=0.7",
"testfixtures>=4.10.0",
"vcrpy>=1.9.0",
"mock>=2.0.0",

8
test-requirements.txt Normal file
View File

@ -0,0 +1,8 @@
pytest==3.0.3
pytest-cov==2.4.0
pytest-flake8==0.7
testfixtures==4.10.0
vcrpy==1.9.0
mock==2.0.0
Flask==0.11.1
Flask-RESTful==0.3.5