Skip to content

Commit b0a4400

Browse files
authored
Switch from codecov to coveralls (#1430)
1 parent 4b1acde commit b0a4400

5 files changed

Lines changed: 29 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,24 @@ jobs:
3737
- name: Test with pytest via tox
3838
run: |
3939
tox -e gh
40-
- name: Upload coverage to Codecov
41-
uses: codecov/codecov-action@v3
40+
41+
- name: Coveralls Parallel
42+
uses: coverallsapp/github-action@master
43+
with:
44+
github-token: ${{ secrets.github_token }}
45+
flag-name: Unittests-${{ matrix.os }}-${{ matrix.python-version }}
46+
parallel: true
47+
path-to-lcov: ./coverage.lcov
48+
49+
coveralls:
50+
needs: test
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Coveralls Finished
54+
uses: coverallsapp/github-action@master
4255
with:
43-
fail_ci_if_error: true
56+
github-token: ${{ secrets.github_token }}
57+
parallel-finished: true
4458

4559
static-code-analysis:
4660
runs-on: ubuntu-latest

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ python-can
3737
:target: https://app.travis-ci.com/github/hardbyte/python-can
3838
:alt: Travis CI Server for develop branch
3939

40-
.. |coverage| image:: https://codecov.io/gh/hardbyte/python-can/branch/develop/graph/badge.svg
41-
:target: https://codecov.io/gh/hardbyte/python-can/branch/develop
42-
:alt: Test coverage reports on Codecov.io
40+
.. |coverage| image:: https://coveralls.io/repos/github/hardbyte/python-can/badge.svg?branch=develop
41+
:target: https://coveralls.io/github/hardbyte/python-can?branch=develop
42+
:alt: Test coverage reports on Coveralls.io
4343

4444
.. |mergify| image:: https://img.shields.io/endpoint.svg?url=https://api.mergify.com/v1/badges/hardbyte/python-can&style=flat
4545
:target: https://mergify.io

doc/development.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The modules in ``python-can`` are:
108108
Creating a new Release
109109
----------------------
110110

111-
- Release from the ``master`` branch (except for pre-releases).
111+
- Release from the ``main`` branch (except for pre-releases).
112112
- Update the library version in ``__init__.py`` using `semantic versioning <http://semver.org>`__.
113113
- Check if any deprecations are pending.
114114
- Run all tests and examples against available hardware.

test/test_message_class.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pickle
88
from datetime import timedelta
99

10-
from hypothesis import given, settings
10+
from hypothesis import HealthCheck, given, settings
1111
import hypothesis.errors
1212
import hypothesis.strategies as st
1313

@@ -42,12 +42,13 @@ class TestMessageClass(unittest.TestCase):
4242
# The first run may take a second on CI runners and will hit the deadline
4343
@settings(
4444
max_examples=2000,
45+
suppress_health_check=[HealthCheck.too_slow],
4546
deadline=None if IS_GITHUB_ACTIONS else timedelta(milliseconds=500),
4647
)
4748
@pytest.mark.xfail(
4849
IS_WINDOWS and IS_PYPY,
4950
raises=hypothesis.errors.Flaky,
50-
reason="Hypothesis generates inconistent timestamp floats on Windows+PyPy-3.7",
51+
reason="Hypothesis generates inconsistent timestamp floats on Windows+PyPy-3.7",
5152
)
5253
def test_methods(self, **kwargs):
5354
is_valid = not (

tox.ini

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ isolated_build = true
55
deps =
66
pytest==7.1.*,>=7.1.2
77
pytest-timeout==2.0.2
8-
pytest-cov==3.0.0
9-
coverage==6.3
10-
codecov==2.1.12
8+
coveralls==3.3.1
9+
pytest-cov==4.0.0
10+
coverage==6.5.0
1111
hypothesis~=6.35.0
1212
pyserial~=3.5
1313
parameterized~=0.8
@@ -24,22 +24,20 @@ recreate = True
2424
passenv =
2525
CI
2626
GITHUB_*
27+
COVERALLS_*
2728
PY_COLORS
2829

2930
[testenv:travis]
3031
passenv =
3132
CI
3233
TRAVIS
3334
TRAVIS_*
34-
CODECOV_*
3535
TEST_SOCKETCAN
3636

37-
commands_post =
38-
codecov -X gcov
3937

4038
[pytest]
4139
testpaths = test
42-
addopts = -v --timeout=300 --cov=can --cov-config=tox.ini --cov-report=xml --cov-report=term
40+
addopts = -v --timeout=300 --cov=can --cov-config=tox.ini --cov-report=lcov --cov-report=term
4341

4442

4543
[coverage:run]

0 commit comments

Comments
 (0)