diff --git a/README.md b/README.md index 689f1bd..597fdcb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cpp_coveralls/__init__.py b/cpp_coveralls/__init__.py index c3d0e4e..d79c3cc 100644 --- a/cpp_coveralls/__init__.py +++ b/cpp_coveralls/__init__.py @@ -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" diff --git a/cpp_coveralls/gitrepo.py b/cpp_coveralls/gitrepo.py index 31bb1e3..b8d404d 100644 --- a/cpp_coveralls/gitrepo.py +++ b/cpp_coveralls/gitrepo.py @@ -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] }