added .travis-kivy.yml for runnig kivy test cases

This commit is contained in:
navjot 2021-04-08 15:24:38 +05:30
parent b7d68db7f2
commit a59b25f1ca
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
3 changed files with 37 additions and 1 deletions

15
.travis-kivy.yml Normal file
View File

@ -0,0 +1,15 @@
language: python3.7
cache: pip3
dist: bionic
python:
- "3.7"
addons:
apt:
packages:
- build-essential
- libcap-dev
- xvfb
install:
- pip3 install -r kivy-requirements.txt
script:
- python3 src/tests-kivy.py

View File

@ -14,6 +14,8 @@ RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get -y install sudo RUN apt-get -y install sudo
RUN apt-get -y install git
RUN apt-get install -yq --no-install-suggests --no-install-recommends \ RUN apt-get install -yq --no-install-suggests --no-install-recommends \
# travis xenial bionic # travis xenial bionic
python-setuptools libssl-dev libpq-dev python-prctl python-dev \ python-setuptools libssl-dev libpq-dev python-prctl python-dev \
@ -61,4 +63,6 @@ ENV LC_ALL en_US.UTF-8
WORKDIR /home/builder/src WORKDIR /home/builder/src
ENTRYPOINT /usr/local/bin/travis2bash.sh
# ENTRYPOINT /usr/local/bin/travis2bash.sh
ENTRYPOINT ["/usr/local/bin/travis2bash.sh", ".travis-kivy.yml"]

17
src/tests-kivy.py Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env python
"""Custom tests runner script for python3 kivy app"""
import random # noseq
import sys
import unittest
def unittest_discover():
"""Explicit test suite creation"""
loader = unittest.defaultTestLoader
loader.sortTestMethodsUsing = lambda a, b: random.randint(-1, 1)
return loader.discover('bitmessagekivy.tests')
if __name__ == "__main__":
result = unittest.TextTestRunner(verbosity=2).run(unittest_discover())
sys.exit(not result.wasSuccessful())