Skip to content

Commit 360b261

Browse files
committed
Move from coveralls to codecov
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
1 parent b0f6e7c commit 360b261

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
run: |
2323
python3 -m pip install -U pip
2424
python3 -m pip install -r requirements.txt
25-
python3 -m pip install coveralls pytest
25+
python3 -m pip install pytest pytest-cov
2626
python3 -m pip install .
2727
2828
- name: Lint codebase
2929
run: pylint_runner
3030

3131
- name: Run tests
32-
run: coverage run --source=pylint_runner -m pytest
32+
run: python3 -m pytest --cov=pylint_runner tests/
3333

34-
#- run: coveralls
35-
# env:
36-
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- uses: codecov/codecov-action@v2
35+
with:
36+
files: ./.coverage

pylint_runner/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,10 @@ def run(self, output=None, error=None):
209209
sys.exit(run.linter.msg_status)
210210

211211

212-
def main(output=None, error=None, verbose=False):
212+
def main(output=None, error=None, verbose=False, args=None):
213213
""" The main (cli) interface for the pylint runner. """
214-
args = sys.argv[1:]
214+
if args is None:
215+
args = sys.argv[1:]
215216
if verbose and '--verbose' not in args:
216217
args.insert(0, '--verbose')
217218
runner = Runner(args)

tests/test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_get_files_current_dir():
3333
def test_main():
3434
with pytest.raises(SystemExit) as excinfo:
3535
with open(os.devnull, 'w', encoding='ascii') as devnull:
36-
runner.main(devnull)
36+
runner.main(devnull, args=[])
3737
assert excinfo.value.code == 0
3838

3939

0 commit comments

Comments
 (0)