Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,22 @@ jobs:
fi
fi

- name: Run tests
run: poetry run pytest tests/ -v
- name: Run tests with coverage
run: |
poetry run pytest tests/ -v \
--cov=squawk_alembic \
--cov-report=xml \
--cov-report=term-missing \
--cov-fail-under=95

- name: Enforce diff coverage on changed lines
if: github.event_name == 'pull_request'
run: |
# diff-cover needs main's history to compute the merge-base for the PR diff.
git fetch origin main
poetry run diff-cover coverage.xml \
--compare-branch=origin/main \
--fail-under=80

auto-tag:
needs: lint-and-test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dist/
# Test / coverage
.pytest_cache/
.coverage
coverage.xml
htmlcov/

# Editors / OS
Expand Down
87 changes: 86 additions & 1 deletion poetry.lock

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

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "squawk-alembic"
version = "0.3.4"
version = "0.3.5"
description = "Pre-commit hook to lint Alembic migration SQL with squawk"
packages = [{include = "squawk_alembic"}]
readme = "README.md"
Expand Down Expand Up @@ -35,6 +35,7 @@ pytest = "~=9.0.3"
ruff = "~=0.13.3"
pyrefly = "~=1.1.1"
pytest-cov = "~=7.1.0"
diff-cover = "~=10.2.1"

[tool.poetry.scripts]
squawk-alembic = "squawk_alembic.hook:main"
Expand Down
2 changes: 1 addition & 1 deletion squawk_alembic/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.4"
__version__ = "0.3.5"
Loading