Skip to content

Commit

Permalink
Merge pull request #357 from Mause/feature/coverage
Browse files Browse the repository at this point in the history
fix: add code coverage reporting
  • Loading branch information
kodiakhq[bot] authored Aug 6, 2022
2 parents 811c38e + e6525f3 commit 8d34358
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pythonapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- python: 3.9
bleeding_edge: true

env:
PYTHON: ${{matrix.python}}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
Expand Down Expand Up @@ -52,3 +55,9 @@ jobs:
if: always()
with:
junit_files: results.xml
- uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
env_vars: PYTHON # set from matrix
fail_ci_if_error: true
verbose: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
dist/
*.egg-info
__pycache__/
.tox/
htmlcov/
.coverage
coverage.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# duckdb_engine

[![Supported Python Versions](https://img.shields.io/pypi/pyversions/duckdb-engine)](https://pypi.org/project/duckdb-engine/) [![PyPI version](https://badge.fury.io/py/duckdb-engine.svg)](https://badge.fury.io/py/duckdb-engine)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/duckdb-engine)](https://pypi.org/project/duckdb-engine/) [![PyPI version](https://badge.fury.io/py/duckdb-engine.svg)](https://badge.fury.io/py/duckdb-engine) [![codecov](https://codecov.io/gh/Mause/duckdb_engine/branch/master/graph/badge.svg)](https://codecov.io/gh/Mause/duckdb_engine)

Basic SQLAlchemy driver for [DuckDB](https://duckdb.org/)

Expand Down
86 changes: 84 additions & 2 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 @@ -26,6 +26,7 @@ hypothesis = "^6.31.6"
pandas = "^1"
ipython-sql = "^0.4.1"
sqlalchemy-stubs = "^0.4"
pytest-cov = {extras = ["coverage"], version = "^3.0.0"}

[tool.poetry.plugins."sqlalchemy.dialects"]
duckdb = "duckdb_engine:Dialect"
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ whitelist_externals = poetry
commands =
poetry install -v
poetry run pip install duckdb --pre -U
poetry run pytest --junitxml=results.xml
poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml

[testenv]
whitelist_externals = poetry
commands =
poetry install -v
poetry run pytest --junitxml=results.xml
poetry run pytest --junitxml=results.xml --cov --cov-report xml:coverage.xml

0 comments on commit 8d34358

Please sign in to comment.