diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a82da71..5b39079 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,9 +53,17 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh uv sync --all-extras --frozen --no-install-project uv run alembic upgrade head - uv run pytest + uv run pytest . --cov=. --cov-report xml env: ENVIRONMENT: dev PYTHONDONTWRITEBYTECODE: 1 PYTHONUNBUFFERED: 1 DB_HOST: 127.0.0.1 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4.0.1 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: ./coverage.xml + flags: unittests + name: codecov-${{ matrix.python-version }} diff --git a/readme.md b/readme.md index 0f63ab1..fbcbd0d 100644 --- a/readme.md +++ b/readme.md @@ -1,9 +1,9 @@ ## Async template on LiteStar and SQLAlchemy 2 +[![Test Coverage](https://codecov.io/gh/modern-python/litestar-sqlalchemy-template/branch/main/graph/badge.svg)](https://codecov.io/gh/modern-python/litestar-sqlalchemy-template) [![GitHub issues](https://img.shields.io/github/issues/modern-python/litestar-sqlalchemy-template)](https://github.com/modern-python/litestar-sqlalchemy-template/issues) [![GitHub forks](https://img.shields.io/github/forks/modern-python/litestar-sqlalchemy-template)](https://github.com/modern-python/litestar-sqlalchemy-template/network) [![GitHub stars](https://img.shields.io/github/stars/modern-python/litestar-sqlalchemy-template)](https://github.com/modern-python/litestar-sqlalchemy-template/stargazers) -[![GitHub license](https://img.shields.io/github/license/modern-python/litestar-sqlalchemy-template)](https://github.com/modern-python/litestar-sqlalchemy-template/blob/main/LICENSE) ### Description Production-ready dockerized async REST API on LiteStar with SQLAlchemy and PostgreSQL