Skip to content

Commit

Permalink
Enable Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
maximebf committed May 20, 2024
1 parent 80286d6 commit 7c1331f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
python -m pip install --upgrade pip setuptools wheel poetry
poetry install
- name: Test with pytest
run: poetry run pytest tests --junitxml=junit/test-results.xml --cov=sqlorm --cov-report=xml --cov-report=html
run: poetry run pytest tests --cov=sqlorm --cov-report=xml
- name: Lint with Ruff
run: poetry run ruff check
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**SQL-focused Python ORM**

![GitHub License](https://img.shields.io/github/license/hyperflask/sqlorm) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/hyperflask/sqlorm/python.yml?branch=main) ![Code coverage](https://img.shields.io/badge/coverage-90%25-blue)
![GitHub License](https://img.shields.io/github/license/hyperflask/sqlorm) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/hyperflask/sqlorm/python.yml?branch=main) ![Codecov](https://img.shields.io/codecov/c/github/hyperflask/sqlorm)

ORMs and developers often end up in a love/hate relationship. The advantages of ORMs (the mapping of objects) can be negated by their compromises (have to learn their pseudo sql syntax, less control over the generated sql, low performance).

Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@ packages = [{include = "sqlorm"}]
[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-cov = "^4.1.0"
ruff = "^0.4.3"

[tool.poetry.group.postgresql.dependencies]
psycopg = {extras = ["binary"], version = "^3.1.18"}

[tool.poetry.group.mysql.dependencies]
mysql-connector-python = "^8.3.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.dev.dependencies]
pytest = "^8.0.0"
pytest-cov = "^4.1.0"
ruff = "^0.4.3"

[tool.ruff]
include = ["sqlorm/**/*.py"]
line-length = 100

[tool.ruff.lint]
exclude = ["sqlorm/__init__.py"]
exclude = ["sqlorm/__init__.py"]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit 7c1331f

Please sign in to comment.