Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ before_install:
- brew update
- brew install pyenv
- eval "$(pyenv init -)"
- pyenv install 2.7.6
- pyenv global 2.7.6
- pyenv install 3.7
- pyenv global 3.7
- pyenv rehash
- pip install cpp-coveralls
- pyenv rehash
Expand Down
9 changes: 8 additions & 1 deletion cpp_coveralls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,14 @@ def run():
args.include.extend(yml.get('include', []))
args.exclude_lines_pattern.extend(yml.get('exclude_lines_pattern', []))

args.service_job_id = os.environ.get('TRAVIS_JOB_ID', '')
if(args.service_name == 'travis-ci'):
args.service_job_id = os.environ.get('TRAVIS_JOB_ID', '')
elif(args.service_name == 'appveyor'):
args.service_job_id = os.environ.get('APPVEYOR_BUILD_ID', '')
elif(args.service_name == 'circle-ci'):
args.service_job_id = os.environ.get('CIRCLE_WORKFLOW_ID', '')
else:
args.service_job_id = os.environ.get('CI_BUILD_ID', '')

if args.repo_token == '' and args.service_job_id == '':
raise ValueError("\nno coveralls.io token specified and no travis job id found\n"
Expand Down
3 changes: 2 additions & 1 deletion cpp_coveralls/gitrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ def gitrepo(cwd):
},
'branch': os.environ.get('TRAVIS_BRANCH',
os.environ.get('APPVEYOR_REPO_BRANCH',
os.environ.get('CIRCLE_BRANCH',
os.environ.get('CI_BRANCH',
repo.git('rev-parse', '--abbrev-ref', 'HEAD')[1].strip()))),
repo.git('rev-parse', '--abbrev-ref', 'HEAD')[1].strip())))),
'remotes': [{'name': line.split()[0], 'url': line.split()[1]}
for line in repo.git('remote', '-v')[1] if '(fetch)' in line]
}
Expand Down