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

Add support for Travis CI. #14

Closed
wants to merge 1 commit into from

Conversation

maximumspatium
Copy link
Contributor

Well, time to setup TravisCI...

Here we go. You'd need to hook up Travis CI to the ScratchABlock Github repository in order to run automated tests.

run_tests Outdated
@@ -7,9 +7,9 @@ failed() {

if [ -z "$1" -o "$1" == "unit" ]; then
echo "=== test_unit ==="
nosetests3 --version || nose_missing=1
nosetests --version || nose_missing=1
Copy link
Owner

Choose a reason for hiding this comment

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

This will break running the testsuite on a normal system, where "python" and "nosetests" refer to python2, while python3 should be "python3" and "nosetests3".

@maximumspatium
Copy link
Contributor Author

maximumspatium commented Jan 4, 2018

This will break running the testsuite on a normal system, where "python" and "nosetests" refer to python2, while python3 should be "python3" and "nosetests3".

Hmm, this didn't work for me on a "normal system" either (Ubuntu). I kept getting nosetests3: command not found until I installed python3-nose.

For Travis, it's recommended to use pip packages, not system-wide packages.

What's about testing for both nosetests and nosetests3?

@maximumspatium maximumspatium force-pushed the travis-ci branch 2 times, most recently from 68e568a to be7953f Compare January 4, 2018 14:55
@pfalcon
Copy link
Owner

pfalcon commented Jan 4, 2018

Hmm, this didn't work for me on a "normal system" either (Ubuntu). I kept getting nosetests3: command not found until I installed python3-nose.

Yes, that's how it's expected to work, on Debian/Ubuntu. That may be not portable to other distros, but given python2/python3 split, there's hardly a better way to ensure that unsuspecting users don't run python2's version and don't get weird errors.

@pfalcon
Copy link
Owner

pfalcon commented Jan 4, 2018

For Travis, it's recommended to use pip packages, not system-wide packages.

And distros recommend to use their packages, and most users follow. This creates a discrepancy between Travis abstract land and real-world user systems, leading to conflicts like in the latest iteration:

ImportError: No module named 'yaml'

@pfalcon
Copy link
Owner

pfalcon commented Jan 4, 2018

So yep, we either need to switch fully to distro packages, and find a way to use non-distro packages which is compatible with distro packages. 1st, like you do, is apparently easier.

@maximumspatium
Copy link
Contributor Author

I've just switched the Travis integration to distributions packages at the cost of highly increased testing time due to additional download and installation. Moreover, Travis testing distro still stuck with the older nosetests 1.3.1.
Anyway, it works now.

@pfalcon
Copy link
Owner

pfalcon commented Jan 4, 2018

Thanks for taking care of that! Will merge on a free minute. (After appending ".travis.yml: " to the commit message - I really love those location prefixes ;-) ).

@maximumspatium
Copy link
Contributor Author

After appending ".travis.yml: " to the commit message - I really love those location prefixes ;-)

Yes, that's a royal pain in the ass.

@pfalcon
Copy link
Owner

pfalcon commented Jan 4, 2018

Thanks, cleaned up and merged.

@pfalcon pfalcon closed this Jan 4, 2018
@maximumspatium maximumspatium deleted the travis-ci branch January 4, 2018 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants