Skip to content
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ jobs:
pytest:
name: Pytest
runs-on: ubuntu-latest
permissions:
# contents: write lets the action store coverage data and the badge on
# its data branch (on push to master). pull-requests: write lets it post
# the coverage comment on pull requests. Note: fork PRs get a read-only
# token from GitHub regardless, so they will not receive a comment.
Comment on lines +13 to +16
contents: write
pull-requests: write
Comment on lines +17 to +18
steps:
- uses: actions/checkout@v4

Expand All @@ -21,4 +28,9 @@ jobs:
run: pip install -e ".[dev]"

- name: Run pytest
run: pytest
run: pytest --cov=mergai --cov-report=term-missing

- name: Coverage comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mergai

[![Format Check](https://github.com/Percona-Lab/mergai/actions/workflows/format-check.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/format-check.yml) [![Lint](https://github.com/Percona-Lab/mergai/actions/workflows/lint.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/lint.yml) [![Dependency Check](https://github.com/Percona-Lab/mergai/actions/workflows/deps-check.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/deps-check.yml) [![Security Scan](https://github.com/Percona-Lab/mergai/actions/workflows/security.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/security.yml)
[![Format Check](https://github.com/Percona-Lab/mergai/actions/workflows/format-check.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/format-check.yml) [![Lint](https://github.com/Percona-Lab/mergai/actions/workflows/lint.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/lint.yml) [![Dependency Check](https://github.com/Percona-Lab/mergai/actions/workflows/deps-check.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/deps-check.yml) [![Security Scan](https://github.com/Percona-Lab/mergai/actions/workflows/security.yml/badge.svg)](https://github.com/Percona-Lab/mergai/actions/workflows/security.yml) [![Coverage](https://raw.githubusercontent.com/Percona-Lab/mergai/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/Percona-Lab/mergai/blob/python-coverage-comment-action-data/htmlcov/index.html)

A CLI tool for AI-assisted merge conflict resolution, designed for maintaining long-running forks that regularly sync with upstream repositories.

Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,18 @@ dev = [
"pip-audit>=2.7.0",
"deptry>=0.12.0",
"pytest>=7.0.0",
"pytest-cov>=5.0.0",
]

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.coverage.run]
# relative_files is required by python-coverage-comment-action so the
# recorded paths match across the CI checkout and the reporting workflow.
relative_files = true
source = ["mergai"]

[tool.black]
line-length = 88
target-version = ['py310']
Expand Down Expand Up @@ -98,4 +105,4 @@ exclude = [
[tool.deptry]
# Ignore dev tools that are CLI-based and not imported in code
[tool.deptry.per_rule_ignores]
DEP002 = ["pre-commit", "ruff", "mypy", "types-PyYAML", "pip-audit", "deptry", "pytest"]
DEP002 = ["pre-commit", "ruff", "mypy", "types-PyYAML", "pip-audit", "deptry", "pytest", "pytest-cov"]
Loading