Skip to content

Commit 315ceeb

Browse files
committed
ci(reviewer-bot): finalize migrated test configuration
1 parent ab60102 commit 315ceeb

File tree

2 files changed

+42
-3
lines changed

2 files changed

+42
-3
lines changed

.github/workflows/reviewer-bot-tests.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
workflow_dispatch:
2121

2222
jobs:
23-
reviewer-bot-tests:
23+
reviewer-bot-unit:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout repository
@@ -32,11 +32,11 @@ jobs:
3232
- name: Install dependencies
3333
run: uv sync --dev
3434

35-
- name: Run migrated reviewer bot tests with targeted coverage
35+
- name: Run reviewer bot unit and integration tests with targeted coverage
3636
run: >-
3737
mkdir -p artifacts/coverage &&
3838
COVERAGE_FILE=artifacts/coverage/.coverage
39-
uv run pytest tests --import-mode=importlib
39+
uv run pytest tests/unit/reviewer_bot tests/integration/reviewer_bot
4040
--cov=scripts.reviewer_bot
4141
--cov=scripts.reviewer_bot_lib
4242
--cov-branch
@@ -66,3 +66,18 @@ jobs:
6666
f"reviewer-bot branch coverage below floor: {branches:.2f}% < 48%"
6767
)
6868
PY
69+
70+
reviewer-bot-contract:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Checkout repository
74+
uses: actions/checkout@v4
75+
76+
- name: Install uv
77+
uses: astral-sh/setup-uv@v6
78+
79+
- name: Install dependencies
80+
run: uv sync --dev
81+
82+
- name: Run reviewer bot contract tests
83+
run: uv run pytest tests/contract/reviewer_bot

pyproject.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,30 @@ lint.ignore = [
5757
[tool.ruff.lint.flake8-comprehensions]
5858
allow-dict-calls-with-keyword-arguments = true
5959

60+
[tool.pytest.ini_options]
61+
testpaths = ["tests"]
62+
addopts = [
63+
"--import-mode=importlib",
64+
"-ra",
65+
"--strict-config",
66+
"--strict-markers",
67+
]
68+
markers = [
69+
"integration: filesystem, subprocess, multi-module, or boundary tests",
70+
"contract: workflow, CLI, adapter, or artifact contract tests",
71+
]
72+
filterwarnings = ["error"]
73+
xfail_strict = true
74+
75+
[tool.coverage.run]
76+
branch = true
77+
relative_files = true
78+
source = ["scripts.reviewer_bot", "scripts.reviewer_bot_lib"]
79+
80+
[tool.coverage.report]
81+
show_missing = true
82+
skip_empty = true
83+
6084
[dependency-groups]
6185
dev = [
6286
"pytest>=8.3.0",

0 commit comments

Comments
 (0)