CI: Fix coveralls
Broken by coveralls>=2.1.0
This commit is contained in:
parent
ac0cfeabb9
commit
c8c330d481
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
@ -21,7 +21,7 @@ jobs:
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
COVERALLS_PARALLEL: true
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
python -m pip install coveralls
|
||||
python -m coveralls
|
||||
@ -34,19 +34,9 @@ jobs:
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.x
|
||||
- name: Install Coveralls
|
||||
run: python -m pip install coveralls
|
||||
- name: Call Coveralls parallel builds webhook
|
||||
shell: python
|
||||
- name: Finish Coveralls parallel builds
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
import json, os, sys
|
||||
from urllib.request import Request, urlopen
|
||||
from coveralls import Coveralls
|
||||
_, job, _ = Coveralls.load_config_from_github()
|
||||
data = json.dumps({'repo_token': os.environ.get('COVERALLS_REPO_TOKEN', ''),
|
||||
'payload': {'status': 'done', 'build_num': job}}).encode()
|
||||
headers = {'Content-type': 'application/json'}
|
||||
with urlopen(Request('https://coveralls.io/webhook', data, headers)) as f:
|
||||
sys.stderr.buffer.write(f.read() + b'\n')
|
||||
python -m pip install coveralls
|
||||
python -m coveralls --finish
|
||||
|
Loading…
Reference in New Issue
Block a user