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

Activated Travis CI #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Activated Travis CI #6

wants to merge 2 commits into from

Conversation

rishabhdas
Copy link

Fixes #5

  • Please add hacktoberfest label to this issue

@drobakowski
Copy link
Member

Hi @rishabhdas, thanks a lot for starting working on this! :) 👍

We're using tox to automate the test process. So far we were running this on our own private CI server which was using our docker image synlay/python-ci. You can the source for that here on GitHub (https://github.com/synlay/docker-python-ci) or the image directly on Docker Hub. The server was running the command:

bash -c "AWS_ACCESS_KEY_ID=${CI.AWS_KEY} AWS_SECRET_ACCESS_KEY=${CI.AWS_SECRET_PASSWORD} AWS_DEFAULT_REGION=${CI.AWS_REGION} SYNLAY_AWS_KMS_KEY_ID=${CI.SYNLAY_AWS_KMS_KEY_ID} tox"

As you might have noticed this test needs some encrypted AWS env. variables and this test would fail for PR's from the outside like yours. This test would need to be excluded from the default Travis test run. To achieve this it would be possible to mark this tests for example with a pytest annotation like @pytest.mark.internaltest and let tox only run tests without this annotation tox -e travis.

Changes in tox.ini:

...
[testenv:travis]
commands=py.test -m "not internaltest" {posargs}
deps=
    pytest
setenv =
    TERM = xterm
    PYTHONIOENCODING=UTF-8
...

So to successfully be able to merge this PR I would like to ask you to consider the following task list:

  • Refine the .travis.yml file accordingly to reflect the existing docker build with bash -c "tox" - the env. vars should be omitted for now
  • Alternatively: Consider some other tox integration for Travis CI like the one from https://github.com/ryanhiebert/tox-travis
  • Include pytest annotation for the test and include the new env. testenv:travis into tox.ini

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants