From b99d5670dbcde5c5a0f1080eb95f1af5b66b17d8 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Thu, 8 Oct 2020 18:35:18 +0300 Subject: [PATCH] A job for Fedora 31 using docker (only on PRs for now) --- .travis.yml | 10 ++++++++++ packages/Dockerfile.fedora | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 packages/Dockerfile.fedora diff --git a/.travis.yml b/.travis.yml index a481c79f..2fe477e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ dist: bionic python: - "2.7_with_system_site_packages" - "3.7" +services: + - docker addons: apt: packages: @@ -17,6 +19,14 @@ jobs: allow_failures: - os: windows include: + - dist: bionic + - dist: bionic + if: type = pull_request + language: generic + install: + - docker build -t bm_fedora -f packages/Dockerfile.fedora . + script: + - docker run --rm bm_fedora - os: windows language: shell before_install: diff --git a/packages/Dockerfile.fedora b/packages/Dockerfile.fedora new file mode 100644 index 00000000..e5e264ce --- /dev/null +++ b/packages/Dockerfile.fedora @@ -0,0 +1,35 @@ +# A container for testing PyBitmessage on Fedora + +FROM fedora:31 + +EXPOSE 8444 8442 + +ENV HOME /home/bitmessage +ENV BITMESSAGE_HOME ${HOME} +ENV TRAVIS_DIST fedora31 + +RUN dnf -y install \ + glibc-langpack-en gcc-c++ libcap-devel openssl-devel \ + python2-devel python2-pip python2-qt4 \ + redhat-rpm-config tor xorg-x11-server-Xvfb + +RUN ln -s /usr/bin/python2 /usr/bin/python + +WORKDIR ${HOME} +ADD . ${HOME} + +# Install tests dependencies +RUN pip2 install --upgrade pip && pip2 install -r requirements.txt +# Install +RUN python2 setup.py install + +# Create a user +RUN useradd bitmessage && chown -R bitmessage ${HOME} + +USER bitmessage + +# Generate default config and run core tests +RUN LC_ALL=en_US.utf8 xvfb-run src/bitmessagemain.py -t + + +CMD ["python2", "setup.py", "test"]