Skip to content

Conversation

@tyll
Copy link
Member

@tyll tyll commented May 14, 2018

Add initial support for coveralls

@tyll tyll changed the title Coveralls Travis-CI + Coveralls May 14, 2018
@pcahyna
Copy link
Member

pcahyna commented May 14, 2018

I suggest renaming the test/ directory to tests/ while you are moving things around. tests/ is in the default role directory structure (try ansible-galaxy init).

@tyll
Copy link
Member Author

tyll commented May 14, 2018 via email

@pcahyna
Copy link
Member

pcahyna commented May 14, 2018

For this we need linux-system-roles/test-harness@3dbfe29 to be deployed or we will break our CI.

It has been deployed since a long time.

@tyll
Copy link
Member Author

tyll commented May 14, 2018 via email

@pcahyna
Copy link
Member

pcahyna commented May 14, 2018

That's the point. It was deployed before being merged. I.e. the state of the CI does not correspond to the GitHub sources. Confusing, huh?

@pcahyna
Copy link
Member

pcahyna commented May 14, 2018

So it broke our CI, but for a different reason. The CI runs playbooks matching tests/tests*.yml (see linux-system-roles/test-harness@3dbfe29#diff-94b2ec369539eb75edac6313adb49eb8 and https://fedoraproject.org/wiki/CI/Standard_Test_Interface#Invocation ) and our tests do not match that.

@tyll
Copy link
Member Author

tyll commented May 14, 2018 via email

@tyll
Copy link
Member Author

tyll commented May 14, 2018

It seems to me that the change for using tests/tests*.yml is not yet deployed because the logs are now nearly empty: https://larsu.fedorapeople.org/logs/linux-system-roles-network-pull-46-41f87fd-centos-6-20180514-184459/test.log

Compare to: https://larsu.fedorapeople.org/logs/linux-system-roles-network-pull-45-4bdffa3-fedora-25-20180509-103824/test.log

Or is there another error?

@@ -7,7 +7,8 @@
import socket
import itertools

sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)))
Copy link
Member

Choose a reason for hiding this comment

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

I doubt this will work b/c in test_default.yml the module is imported from the same directory.

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I see the tests are passing - the line was must have been unnecessary, given that Python puts the directory of the script in the path by default.

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 need the change to be able to run tox from the library/ directory for example.

Copy link
Member

Choose a reason for hiding this comment

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

I don't object against the change, I was just wondering why that line was ever there (and how removing it helps you with running anything, to me it seems like a no-op)

Copy link
Member Author

Choose a reason for hiding this comment

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

It is not removed but changed to the next line, which contains the correct value after the move. Not sure why it was there in the first place, though.

- name: Test executing the role with default parameters
hosts: all
roles:
- linux-system-roles.network
Copy link
Member

Choose a reason for hiding this comment

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

Tests seem to be gone, there are only deletions, no additions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, too much rebase fun. This should be fixed now.

- name: Test executing the role with default parameters
hosts: all
roles:
- linux-system-roles.network
Copy link
Member

Choose a reason for hiding this comment

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

Tests seem to be gone, there are deletions, no additions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, too much rebase fun. This should be fixed now.

@pcahyna
Copy link
Member

pcahyna commented May 14, 2018

Could you please squash the commits which rename files so that every file is renamed at most once in the commit series? Right now some of the files are renamed several times.

@tyll
Copy link
Member Author

tyll commented May 15, 2018

I squashed the commits for the the new naming scheme and for travis/coveralls support. I kept the renaming of the test_network_connections.py separate since it is a different logical step. Therefore it is renamed twice.

@tyll tyll force-pushed the coveralls branch 2 times, most recently from 3064cc9 to 67e1f99 Compare May 17, 2018 09:13
tyll added 3 commits May 17, 2018 11:15
Do not run coveralls by default and do not run flake8 and pylint in
travis. They make it always fail at the moment.
@tyll
Copy link
Member Author

tyll commented May 17, 2018

I rebased it. Also I updated the tox.ini to also show the coverage in the terminal.

@pcahyna pcahyna merged commit 9f00e45 into linux-system-roles:master May 17, 2018
@tyll tyll deleted the coveralls branch May 17, 2018 09:51
linux-system-roles/network
==========================
[![Coverage Status](https://coveralls.io/repos/github/linux-system-roles/network/badge.svg)](https://coveralls.io/github/linux-system-roles/network)
[![Travis Build Status](https://travis-ci.org/linux-system-roles/network.svg?branch=master)](https://travis-ci.org/linux-system-roles/network)
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to put the badges elsewhere because this does not look good when the source is used to generate user documentation in /usr/share/doc or similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

What would the other place be? All other projects I know show the badges there so that visitors can get a fast overview. AFAIK there is no other way to display them on the repo's main page. Checking /usr/share/doc, there are several packages that show the badges in README.md there, for example rpmlint, asciinema, criu, fwupd, neovim, pandoc, ... (checked on my Fedora 28 system).

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