Permalink
Browse files

Applied updates and added Fedora Core CI tests

  • Loading branch information...
joachimmetz committed Feb 3, 2019
1 parent 803b820 commit b4a8b0cfa9cf83b15d611ea2015ecfc16b1926c7
Showing with 86 additions and 21 deletions.
  1. +38 −9 .travis.yml
  2. +1 −0 artifacts.ini
  3. +34 −12 config/travis/install.sh
  4. +13 −0 config/travis/runtests.sh
@@ -1,6 +1,7 @@
matrix:
include:
- env: TARGET="pylint"
- name: "Pylint on Ubuntu Xenial (16.04) with Python 3.5"
env: TARGET="pylint"
os: linux
dist: xenial
sudo: required
@@ -9,7 +10,8 @@ matrix:
python: 3.5
virtualenv:
system_site_packages: true
- env: TARGET="linux-python27"
- name: "Ubuntu Xenial (16.04) with Python 2.7"
env: TARGET="linux-python27"
os: linux
dist: xenial
sudo: required
@@ -18,7 +20,8 @@ matrix:
python: 2.7
virtualenv:
system_site_packages: true
- env: TARGET="linux-python35"
- name: "Ubuntu Xenial (16.04) with Python 3.5"
env: TARGET="linux-python35"
os: linux
dist: xenial
sudo: required
@@ -27,7 +30,8 @@ matrix:
python: 3.5
virtualenv:
system_site_packages: true
- env: [TARGET="linux-python27-tox", TOXENV="py27"]
- name: "Ubuntu Xenial (16.04) with Python 2.7 and tox"
env: [TARGET="linux-python27-tox", TOXENV="py27"]
os: linux
dist: xenial
sudo: required
@@ -36,7 +40,8 @@ matrix:
python: 2.7
virtualenv:
system_site_packages: false
- env: [TARGET="linux-python34-tox", TOXENV="py34"]
- name: "Ubuntu Xenial (16.04) with Python 3.4 and tox"
env: [TARGET="linux-python34-tox", TOXENV="py34"]
os: linux
dist: xenial
sudo: required
@@ -45,7 +50,8 @@ matrix:
python: 3.4
virtualenv:
system_site_packages: false
- env: [TARGET="linux-python35-tox", TOXENV="py35"]
- name: "Ubuntu Xenial (16.04) with Python 3.5 and tox"
env: [TARGET="linux-python35-tox", TOXENV="py35"]
os: linux
dist: xenial
sudo: required
@@ -54,7 +60,8 @@ matrix:
python: 3.5
virtualenv:
system_site_packages: false
- env: [TARGET="linux-python36-tox", TOXENV="py36"]
- name: "Ubuntu Xenial (16.04) with Python 3.6 and tox"
env: [TARGET="linux-python36-tox", TOXENV="py36"]
os: linux
dist: xenial
sudo: required
@@ -63,7 +70,8 @@ matrix:
python: 3.6
virtualenv:
system_site_packages: false
- env: [TARGET="linux-python37-tox", TOXENV="py37"]
- name: "Ubuntu Xenial (16.04) with Python 3.7 and tox"
env: [TARGET="linux-python37-tox", TOXENV="py37"]
os: linux
dist: xenial
sudo: required
@@ -72,7 +80,28 @@ matrix:
python: 3.7
virtualenv:
system_site_packages: false
- env: [TARGET="macos-python27", PYTHONPATH="/Library/Python/2.7/site-packages/"]
- name: "Fedora Core 29 (Docker) with Python 2.7"
env: FEDORA_VERSION="29"
os: linux
dist: xenial
sudo: required
group: edge
language: python
python: 2.7
services:
- docker
- name: "Fedora Core 29 (Docker) with Python 3.7"
env: FEDORA_VERSION="29"
os: linux
dist: xenial
sudo: required
group: edge
language: python
python: 3.7
services:
- docker
- name: "MacOS with Python 2.7.10"
env: [TARGET="macos-python27", PYTHONPATH="/Library/Python/2.7/site-packages/"]
os: osx
osx_image: xcode9.2
language: generic
@@ -4,6 +4,7 @@ status: alpha
name_description: ForensicArtifacts.com Artifact Repository
maintainer: Forensic artifacts <forensicartifacts@googlegroups.com>
homepage_url: https://github.com/ForensicArtifacts/artifacts
git_url: https://github.com/ForensicArtifacts/artifacts.git
description_short: ForensicArtifacts.com Artifact Repository.
description_long: A free, community-sourced, machine-readable knowledge base of forensic
artifacts that the world can use both as an information source and within other tools.
@@ -9,13 +9,21 @@ L2TBINARIES_DEPENDENCIES="PyYAML";

L2TBINARIES_TEST_DEPENDENCIES="funcsigs mock pbr six";

PYTHON2_DEPENDENCIES="python-yaml";
DPKG_PYTHON2_DEPENDENCIES="python-yaml";

PYTHON2_TEST_DEPENDENCIES="python-coverage python-funcsigs python-mock python-pbr python-six python-tox";
DPKG_PYTHON2_TEST_DEPENDENCIES="python-coverage python-funcsigs python-mock python-pbr python-six python-tox";

PYTHON3_DEPENDENCIES="python3-yaml";
DPKG_PYTHON3_DEPENDENCIES="python3-yaml";

PYTHON3_TEST_DEPENDENCIES="python3-mock python3-pbr python3-setuptools python3-six python3-tox";
DPKG_PYTHON3_TEST_DEPENDENCIES="python3-mock python3-pbr python3-setuptools python3-six python3-tox";

RPM_PYTHON2_DEPENDENCIES="python2-pyyaml";

RPM_PYTHON2_TEST_DEPENDENCIES="python2-funcsigs python2-mock python2-pbr python2-six";

RPM_PYTHON3_DEPENDENCIES="python3-pyyaml";

RPM_PYTHON3_TEST_DEPENDENCIES="python3-mock python3-pbr python3-six";

# Exit on error.
set -e;
@@ -42,28 +50,42 @@ then
sudo /usr/bin/hdiutil detach /Volumes/${PACKAGE}-*.pkg
done

elif test -n "${FEDORA_VERSION}";
then
CONTAINER_NAME="fedora${FEDORA_VERSION}";

docker pull registry.fedoraproject.org/fedora:${FEDORA_VERSION};

docker run --name=${CONTAINER_NAME} --detach -i registry.fedoraproject.org/fedora:${FEDORA_VERSION};

docker exec ${CONTAINER_NAME} dnf install -y dnf-plugins-core;

docker exec ${CONTAINER_NAME} dnf copr -y enable @gift/dev;

if test ${TRAVIS_PYTHON_VERSION} = "2.7";
then
docker exec ${CONTAINER_NAME} dnf install -y git python2 ${RPM_PYTHON2_DEPENDENCIES} ${RPM_PYTHON2_TEST_DEPENDENCIES};
else
docker exec ${CONTAINER_NAME} dnf install -y git python3 ${RPM_PYTHON3_DEPENDENCIES} ${RPM_PYTHON3_TEST_DEPENDENCIES};
fi

elif test ${TRAVIS_OS_NAME} = "linux" && test ${TARGET} != "jenkins";
then
sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3-source.list;

if test ${TARGET} = "pylint";
then
if test ${TRAVIS_PYTHON_VERSION} = "2.7";
then
sudo add-apt-repository ppa:gift/pylint2 -y;
else
sudo add-apt-repository ppa:gift/pylint3 -y;
fi
sudo add-apt-repository ppa:gift/pylint3 -y;
fi

sudo add-apt-repository ppa:gift/dev -y;
sudo apt-get update -q;

if test ${TRAVIS_PYTHON_VERSION} = "2.7";
then
sudo apt-get install -y ${PYTHON2_DEPENDENCIES} ${PYTHON2_TEST_DEPENDENCIES};
sudo apt-get install -y ${DPKG_PYTHON2_DEPENDENCIES} ${DPKG_PYTHON2_TEST_DEPENDENCIES};
else
sudo apt-get install -y ${PYTHON3_DEPENDENCIES} ${PYTHON3_TEST_DEPENDENCIES};
sudo apt-get install -y ${DPKG_PYTHON3_DEPENDENCIES} ${DPKG_PYTHON3_TEST_DEPENDENCIES};
fi
if test ${TARGET} = "pylint";
then
@@ -38,6 +38,19 @@ then
PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
fi

elif test -n "${FEDORA_VERSION}";
then
CONTAINER_NAME="fedora${FEDORA_VERSION}";

docker exec "${CONTAINER_NAME}" sh -c "git clone https://github.com/ForensicArtifacts/artifacts.git";

if test ${TRAVIS_PYTHON_VERSION} = "2.7";
then
docker exec "${CONTAINER_NAME}" sh -c "cd artifacts && python2 run_tests.py";
else
docker exec "${CONTAINER_NAME}" sh -c "cd artifacts && python3 run_tests.py";
fi

elif test "${TRAVIS_OS_NAME}" = "linux";
then
COVERAGE="/usr/bin/coverage";

0 comments on commit b4a8b0c

Please sign in to comment.