Skip to content

Commit a87db77

Browse files
authored
Add CI coveralls support (#302)
* Add coveralls step to Github Actions * Fix typo * Add COVERALLS_REPO_TOKEN * Add environment * Add toml to avoid error * Fix tool.coverage.run section * Fix Coveralls * Fix Coveralls * Try running coveralls with py3 * New strategy * Typo * Typo * Use python-coveralls instead * Remove coveralls from pyproject * Downgrade coverage and remove coveralls
1 parent 1a3b040 commit a87db77

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on: [push, pull_request]
88
jobs:
99
build:
1010
runs-on: ubuntu-20.04
11-
11+
environment: CI
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Set up Python 2.7
@@ -24,10 +24,19 @@ jobs:
2424
pip install .
2525
pip install -e ".[test]"
2626
27-
- name: Test
27+
- name: Lint
2828
run: |
29-
coverage run --source=src/onelogin/saml2 --rcfile=tests/coverage.rc setup.py test
30-
coverage report -m --rcfile=tests/coverage.rc
3129
#pycodestyle tests/src/OneLogin/saml2_tests/*.py demo-flask/*.py demo-django/*.py src/onelogin/saml2/*.py --config=tests/pep8.rc
3230
#pyflakes src/onelogin/saml2 demo-django demo-flask tests/src/OneLogin/saml2_tests
3331
flake8 --ignore E226,E302,E41,E731,E501,C901,W504
32+
33+
- name: Test
34+
run: |
35+
coverage run --source=src/onelogin/saml2 --rcfile=tests/coverage.rc setup.py test
36+
37+
- name: Coveralls
38+
env:
39+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
40+
run: |
41+
pip install python-coveralls
42+
coveralls

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,11 @@ flake8 = { version = ">=3.6.0, <=4.0", optional = true}
5555
#[tool.poetry.group.test.dependencies]
5656
freezegun= { version = ">=0.3.11, <=0.4", optional = true}
5757
pytest = { version = ">=4.6.11", optional = true}
58-
coverage = { version = ">=5.5, <6.0", optional = true}
59-
coveralls = { version = ">=1.1, <2.0", optional = true}
58+
coverage = { version = ">=4.5.0, <5.0", optional = true}
6059
#pylint = ">=1.9.4"
6160

6261
[tool.poetry.extras]
63-
test = ["flake8", "freezegun", "pytest", "coverage", "coveralls"]
62+
test = ["flake8", "freezegun", "pytest", "coverage"]
6463

6564
#[tool.poetry.group.test]
6665
#optional = true
@@ -99,9 +98,9 @@ pythonpath = [
9998
[tool.coverage.run]
10099
branch = true
101100
source = ["src/onelogin/saml2"]
102-
ignore_errors = true
103101

104102
[tool.coverage.report]
103+
ignore_errors = true
105104
exclude_lines = [
106105
"pragma: no cover",
107106
"def __repr__",

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@
4040
],
4141
extras_require={
4242
'test': (
43-
'coverage>=5.5, <6.0',
43+
'coverage>=4.5, <5.0',
4444
'freezegun>=0.3.5, <0.4',
4545
'flake8>=3.6.0, < 4.0',
46-
'coveralls>=1.1, < 2.0',
4746
),
4847
},
4948
keywords='saml saml2 xmlsec django flask',

0 commit comments

Comments
 (0)