Skip to content

Commit

Permalink
CI: Fix coveralls
Browse files Browse the repository at this point in the history
Broken by coveralls>=2.1.0
  • Loading branch information
Unrud committed Jul 23, 2020
1 parent ac0cfea commit c8c330d
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit c8c330d

Please sign in to comment.