Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduces CI and tox testing, fixes #679 #794

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sudo: false

language: python

python:
- "2.7"
- "3.6"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll purposely go for 3.6 rather because 3.7 still feels too cutting edge to me and 3.6 more mainstream while not legacy

Copy link
Contributor

@hackalog hackalog Jan 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I agree with that. 3.7 is the current python release, and it's what gets installed by default if I ask for python3 in many places (e.g. my main use case: conda create -n new_environment python=3 ...

Copy link
Member Author

@AndreMiras AndreMiras Jan 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not on Ubuntu 18.04 LTS. Plus it's failing a lot of recipes, e.g. gevent, and when you check on upstream they say, we don't support 3.7 yet. But yes that's debatable.
In any case this PR is not about dropping some support, but more like adding testing where we had none.
Edit: thanks for the feedback by the way, very much appreciated!


install: pip install tox-travis

script: tox
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Buildozer
=========

.. image:: https://travis-ci.com/kivy/buildozer.svg?branch=master
:target: https://travis-ci.com/kivy/buildozer

Buildozer is a tool for creating application packages easily.

The goal is to have one "buildozer.spec" file in your app directory, describing
Expand Down
Empty file added tests/__init__.py
Empty file.
12 changes: 12 additions & 0 deletions tests/test_buildozer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import unittest
from buildozer import Buildozer


class TestBuildozer(unittest.TestCase):

def test_buildozer_base(self):
"""
Basic test making sure the Buildozer object can be instanciated.
"""
buildozer = Buildozer()
self.assertEqual(buildozer.specfilename, 'buildozer.spec')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test will not catch #791 yet because buildozer.spec file doesn't exist, see https://github.com/kivy/buildozer/blob/46cc8f7/buildozer/__init__.py#L121
But I'll write a dedicated test for this case once this gets merged.

16 changes: 16 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[tox]
envlist = pep8,py27,py36

[testenv]
commands =
python -m unittest discover --top-level-directory=. --start-directory=tests/

[testenv:pep8]
deps = flake8
commands = flake8 buildozer/

[flake8]
ignore =
E121, E122, E123, E125, E126, E127, E128, E129, E131, E226, E231, E241,
E262, E265, E301, E302, E303, E305, E402, E501, E502, E722, E731, E741,
F401, F821, F841, W391, W504, W605
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will fix the most important errors little by little in subsequent pull requests