Commit 01ac47b0 authored by Jason Madden's avatar Jason Madden

coverage tweaks.

the action needs relative_files=true in coverage config, even though the coverage report itself gets it right without this.

we can't submit on macOS because the coverage action uses a docker container. so don't bother to gather coverage data there either.
parent c0950253
......@@ -23,7 +23,9 @@ omit =
*/gevent/libev/*.so
*/gevent/libuv/*.so
*/gevent/resolver/*.so
# New in 5.0; required for the GHA coveralls submission.
# Perhaps this obsoletes the source section in [paths]?
relative_files = True
[report]
# Coverage is run on Linux under cPython 2/3 and pypy
......
......@@ -114,7 +114,9 @@ jobs:
brew install ccache
echo CFLAGS=$CFLAGS -Wno-parentheses-equality >>$GITHUB_ENV
- name: Set coverage status
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
# coverage is too slow on PyPy. We can't submit it from macOS (see that action),
# so don't bother taking the speed hit there either.
if: ${{ !startsWith(matrix.python-version, 'pypy') && startsWith(runner.os, 'Linux') }}
run: |
echo G_USE_COV=--coverage >> $GITHUB_ENV
......@@ -128,7 +130,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.ccache/
key: ${{ runner.os }}-ccache-${{ matrix.python-version }}
key: ${{ runner.os }}-ccache2-${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache
......@@ -177,7 +179,7 @@ jobs:
pip install -U -q setuptools wheel twine
pip install -q -U 'faulthandler; python_version == "2.7" and platform_python_implementation == "CPython"'
pip install -q -U 'cffi;platform_python_implementation=="CPython"'
pip install -q -U 'cython>=3.0a5' coveralls
pip install -q -U 'cython>=3.0a5'
pip install 'greenlet>=1.0a1;platform_python_implementation=="CPython"'
- name: Build gevent
......@@ -273,14 +275,13 @@ jobs:
run: |
python -m gevent.tests $G_USE_COV
- name: Report coverage
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: |
python -mpip install -U coveralls
python -m coverage combine || true
python -m coverage report -i || true
python -m coveralls || true
- name: Submit to Coveralls
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
# This is a container action, which only runs on Linux.
if: ${{ !startsWith(matrix.python-version, 'pypy') && startsWith(runner.os, 'Linux') }}
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment