mirror of
https://github.com/cuckoosandbox/cuckoo.git
synced 2026-10-11 21:59:53 +00:00
108 lines
3.5 KiB
YAML
108 lines
3.5 KiB
YAML
language: python
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- python: 2.7
|
|
- os: osx
|
|
osx_image: xcode9.3beta
|
|
language: generic
|
|
|
|
services:
|
|
- mongodb
|
|
- mysql
|
|
- postgresql
|
|
|
|
before_install:
|
|
- |
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
sudo apt-get update -qq
|
|
sudo apt-get install python-dev python-libvirt libffi-dev libssl-dev
|
|
sudo apt-get install swig libpq-dev libmysqlclient-dev rar
|
|
sudo apt-get install libcairo2-dev libpng-dev libossp-uuid-dev
|
|
sudo apt-get install libfreerdp-dev libjpeg-turbo8-dev
|
|
|
|
# Install guacd.
|
|
wget http://archive.apache.org/dist/guacamole/0.9.14/source/guacamole-server-0.9.14.tar.gz
|
|
tar xvf guacamole-server-0.9.14.tar.gz && cd guacamole-server-0.9.14
|
|
./configure --with-init-dir=/etc/init.d && make && sudo make install && sudo ldconfig && cd ../
|
|
|
|
sudo mysql -e "CREATE USER cuckoo@localhost IDENTIFIED BY 'cuckoo'"
|
|
sudo mysql -e "GRANT ALL PRIVILEGES ON * . * TO cuckoo@localhost"
|
|
sudo mysql -e "FLUSH PRIVILEGES"
|
|
sudo mysql -e "CREATE DATABASE cuckootest"
|
|
sudo mysql -e "CREATE DATABASE cuckootest060"
|
|
sudo mysql -e "CREATE DATABASE cuckootest11"
|
|
sudo mysql -e "CREATE DATABASE distcuckootest"
|
|
psql -U postgres -c "CREATE USER cuckoo WITH PASSWORD 'cuckoo'"
|
|
psql -U postgres -c "CREATE DATABASE cuckootest"
|
|
psql -U postgres -c "CREATE DATABASE cuckootest060"
|
|
psql -U postgres -c "CREATE DATABASE cuckootest11"
|
|
psql -U postgres -c "CREATE DATABASE distcuckootest"
|
|
|
|
sudo mysql -e "CREATE DATABASE cuckootestimport"
|
|
sudo mysql cuckootestimport < tests/files/sql/11my.sql
|
|
psql -U postgres -c "CREATE DATABASE cuckootestimport"
|
|
psql -U postgres cuckootestimport <tests/files/sql/11pg.sql >/dev/null
|
|
pip install psycopg2 mysql-python m2crypto==0.24.0 weasyprint==0.36
|
|
else
|
|
brew update || brew update
|
|
brew install libmagic cairo pango mongodb
|
|
brew services start mongodb
|
|
# The following wasn't required in the past and therefore may become
|
|
# obsolete once again in the future. Let's wait and see.
|
|
wget https://bootstrap.pypa.io/get-pip.py
|
|
sudo python get-pip.py
|
|
sudo pip install virtualenv
|
|
virtualenv $HOME
|
|
source $HOME/bin/activate
|
|
fi
|
|
|
|
install:
|
|
# Fetch monitor & stuff which is required for CWD migration tests.
|
|
- python stuff/monitor.py
|
|
|
|
# Bump the version of Cuckoo during tests (e.g., for new Signatures).
|
|
- python stuff/patch_version.py setup.py 3.0
|
|
|
|
- pip install -U pip setuptools
|
|
- python setup.py sdist
|
|
- pip install -e .
|
|
- pip install pytest==4.1.1 pytest-cov codecov coveralls distorm3 pycrypto
|
|
- pip install flask-testing mock pytest-django pytest-pythonpath responses
|
|
|
|
# Install Volatility.
|
|
- git clone https://github.com/volatilityfoundation/volatility vol-setup
|
|
- cd vol-setup && python setup.py install && cd ..
|
|
|
|
script:
|
|
# Start guacd.
|
|
- |
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
sudo /etc/init.d/guacd start
|
|
fi
|
|
|
|
# Create the Cuckoo Working Directory.
|
|
- cuckoo -d
|
|
|
|
# Download Cuckoo Signatures.
|
|
- cuckoo community
|
|
|
|
# Check the code integrity of the Signatures by running Cuckoo.
|
|
- cuckoo -d --ignore-vuln 2>&1|grep "Unable to bind ResultServer"
|
|
|
|
# Run tests from the "tests" directory.
|
|
- py.test --cov=cuckoo
|
|
|
|
after_success:
|
|
- coveralls
|
|
- codecov
|
|
|
|
dist: xenial
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- sqlite3
|
|
sources:
|
|
- travis-ci/sqlite3
|