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

Improve support for AppVeyor CI #97

Merged
merged 3 commits into from
Nov 6, 2015
Merged

Improve support for AppVeyor CI #97

merged 3 commits into from
Nov 6, 2015

Conversation

xolox
Copy link
Contributor

@xolox xolox commented Oct 31, 2015

Recently I added Windows support, AppVeyor CI tests and coverage collection on Windows to a project of mine (see paylogic/pip-accel#61). In the process I found that support for AppVeyor in coveralls-python was a bit tricky to get right.

The $CI_BRANCH environment variable isn't available on AppVeyor and the git rev-parse --abbrev-ref HEAD fallback in coveralls-python incorrectly resulted in HEAD which meant my coverage reports on Coveralls.io referenced the branch name HEAD instead of the expected value master (kind of confusing because HEAD isn't a branch AFAIK :-).

During experimentation I worked around this by creating a wrapper for the coveralls command that would set $CI_BRANCH based on $APPVEYOR_REPO_BRANCH which resulted in correct behavior. However this implies that every user of coveralls-python would need to do this, so I decided to fork and extend coveralls-python instead, hopefully saving future users some time and frustration.

My additions follow the "examples" given by the existing Travis and Circle CI support, this is how I decided what the values of service_job_id and service_pull_request should be (cross-referencing with the documented environment variables for AppVeyor).

I added a test as well that passes in all Python environments I am able to test (I don't have PyPy and certain Python 3 versions installed).

xolox added a commit to paylogic/pip-accel that referenced this pull request Oct 31, 2015
Until my pull request against coveralls-python is merged [1] or an update
from Coveralls is posted on an issue I replied to [2] I guess this is my
last change with regards to Windows support [3] (unless bug reports come
in - let's hope I didn't just jinx that :-).

[1] TheKevJames/coveralls-python#97
[2] lemurheavy/coveralls-public#613
[3] #61
coagulant added a commit that referenced this pull request Nov 6, 2015
Improve support for AppVeyor CI
@coagulant coagulant merged commit 1a62ce2 into TheKevJames:master Nov 6, 2015
@coagulant
Copy link
Contributor

Thnx, could you please update README too?

@xolox
Copy link
Contributor Author

xolox commented Nov 7, 2015

Hi Ilya and thanks for merging my pull request!

What would you like me to add to the readme? From my understanding Travis CI and Circle CI are "special" in the sense that a repo token isn't required (while this is required for AppVeyor just like it is for other CI environments) but apart from that the instructions under the Usage (another CI) section seem to be sufficient already. Or would you like the readme to explicitly/specifically mention that AppVeyor is supported?

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