Skip to content

Tox tests CI guide#28

Closed
djetelina wants to merge 5 commits intoqltysh-archive:masterfrom
djetelina:patch-1
Closed

Tox tests CI guide#28
djetelina wants to merge 5 commits intoqltysh-archive:masterfrom
djetelina:patch-1

Conversation

@djetelina
Copy link
Contributor

I spent few days figuring out how to report coverage using Tox, thanks to the help of customer support I figured out that at least branch name had to be passed otherwise payload would lie about being accepted (it would report as HEAD, has to be MASTER), it's better to pass all of this since code is trying to get it :)

David Jetelina added 5 commits September 10, 2016 16:44
I spent few days figuring out how to report coverage using Tox, thanks to the help of customer support I figured out that at least branch name had to be passed otherwise payload would lie about being accepted (it would report as HEAD, has to be MASTER), it's better to pass all of this since code is trying to get it :)
Markdonwlint seems to hate me, sorry!
@djetelina
Copy link
Contributor Author

Now that I'm checking out this repo's tox, it might actually not be as complex as I wrote it out to be. Could it be that only https://pypi.python.org/pypi/tox-travis is causing this?

@dblandin
Copy link
Contributor

Hey @iScrE4m,

We're relying on commit info directly from git during out own test reporter runs on CircleCI, which is why we don't have to pass through the other CI environment variables.

If you're using a CI provider that doesn't provide reliable info from git, like branch, then you would have to pass the appropriate environment variables in we'll use that value first before falling back on the git commands.

Which CI provider are you using? I'd be fine with pointing users to codeclimate_test_reporter/components/ci.py for an up-to-date mapping of CI data. What do you think?

@djetelina
Copy link
Contributor Author

Heym thanks for explaining a bit more! I'm still not exactly sure what Tox does to it etc. But I guess it doesn't matter I'm using Travis CI. Pointing to ci.py sounds fine to me - but I think it should be pointed to from readme/docs, noone should have to crawl and search the source for something he might need in some cases.

@dblandin
Copy link
Contributor

I'm still not exactly sure what Tox does to it etc.

I don't think Tox manipulates the working directory but it does seem to strip out environment variables, hence the passenv requirement. So it depends on how the git repository is cloned and reset initially within the CI environment.

but I think it should be pointed to from readme/docs

Agreed! That was my thinking as well.

@dblandin
Copy link
Contributor

Going to close this PR for now. Let me know if you have any more questions!

@dblandin dblandin closed this Jan 31, 2017
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