-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
40 lines (40 loc) · 1.36 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
36
37
38
39
40
language: python
dist: trusty
group: deprecated-2017Q4
python:
- "2.7"
env:
- NET_SNMP_VERSION=5.7.3
cache: pip
services:
- mysql
before_install:
# Make localhost a FQDN :/
- sudo sh -c 'echo "127.0.0.1 localhost." >> /etc/hosts'
# Install build dependencies
- sudo apt-get update
- sudo apt-get install -y autoconf libtool make libperl-dev python-dev libsnmp-dev
- net-snmp-config --version
# Create MySQL database
- mysql -e 'CREATE DATABASE IF NOT EXISTS dnsupdate;'
# Install snmpd for testing stuff...
- sudo apt-get install -y snmpd
- sudo cp test/system/snmp/snmpd.conf /etc/snmp/snmpd.conf
- sudo service snmpd restart
# Network bullshit
- sudo ifconfig lo:1 192.0.2.22
# BIND dns server
- sudo apt-get install -y bind9 bind9utils bind9-doc
- sudo cp test/system/bind/bind9 /etc/default/bind9
- sudo cp test/system/bind/named.conf.local /etc/bind/named.conf.local
- sudo cp test/system/bind/192.0.2.db /etc/bind/192.0.2.db
- sudo cp test/system/bind/domain.example.db /etc/bind/domain.example.db
- sudo chown -R bind:bind /etc/bind
- sudo service bind9 restart
install:
- pip install -r requirements.txt
script: python -m coverage run -m unittest discover
after_sucess:
- echo "Code coverage stuff..."
- coveralls
- CODECLIMATE_REPO_TOKEN=2c0fd97f0ed7e3c76eebab55dafbd8e6158b7cc77c19ae00ca11149e3b21934d codeclimate-test-reporter