Skip to content

Commit

Permalink
Add coverage to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Rowe authored and Josh Rowe committed Nov 2, 2019
1 parent c3df629 commit 2dac586
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 8 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.github_token }}
COVERALLS_SERVICE_NAME: github
run: |
pip install pytest pytest-cov poetry
pip install pytest pytest-cov poetry boto3 moto coveralls
poetry install
pytest --cov-report term-missing --cov=dataengineeringutils3 tests/
pytest --cov=dataengineeringutils3 tests/
coveralls
1 change: 1 addition & 0 deletions dataengineeringutils3/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ class JsonNlSplitFileWriter(SplitFileWriter):
extension = ".jsonl.gz"

def _write(self, file_path):
"""Gzip string to file path in s3"""
gzip_string_write_to_s3(self.string, file_path)
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ boto3 = "^1.10"
pytest = "^3.4"
moto = "^1.3"
pytest-cov = "^2.8"
boto3 = "^1.10"

[build-system]
requires = ["poetry>=0.12"]
Expand Down
11 changes: 11 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
exclude = .git/, .github/, */__init__.py
max-complexity = 10
max-line-length = 80

[coverage:run]
omit =
*/__init__.py

[coverage:report]
show_missing = True

0 comments on commit 2dac586

Please sign in to comment.