Public Access
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
570de94575 | ||
|
|
55583fe399 | ||
|
|
35f4fb7172 | ||
|
|
b3d47753a8 |
@@ -52,10 +52,8 @@ jobs:
|
||||
python3 -m devx.ci.detect_release_commit
|
||||
- name: Docker registry login
|
||||
if: >-
|
||||
steps.check.outputs.is-release == 'false' && (
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||
)
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
||||
env:
|
||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
||||
@@ -68,10 +66,8 @@ jobs:
|
||||
echo "$_TOKEN" | docker login git.oblachno.oblachno.fyi -u "$CI_GITEA_USERNAME" --password-stdin
|
||||
- name: Build and push tier images
|
||||
if: >-
|
||||
steps.check.outputs.is-release == 'false' && (
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||
)
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && steps.check.outputs.is-release == 'false')
|
||||
env:
|
||||
CI_GITEA_API_TOKEN: ${{ secrets.CI_GITEA_API_TOKEN }}
|
||||
CI_GITEA_USERNAME: ${{ vars.CI_GITEA_USERNAME }}
|
||||
@@ -117,7 +113,7 @@ jobs:
|
||||
|
||||
cleanup:
|
||||
needs: [build-and-push]
|
||||
if: always() && needs.build-and-push.result == 'success' && needs.build-and-push.outputs.is-release == 'false'
|
||||
if: always() && needs.build-and-push.result == 'success'
|
||||
runs-on: docker
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.41.1] - 2026-07-13
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Check_test_isolation accepts multiple --test-path values
|
||||
|
||||
## [0.41.0] - 2026-07-13
|
||||
|
||||
### Features
|
||||
|
||||
@@ -16,12 +16,12 @@ quality badges.
|
||||
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
|
||||
## Why devx?
|
||||
|
||||
@@ -87,7 +87,7 @@ extra index and list devx in your dependencies:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.41.0",
|
||||
"devx>=0.41.1",
|
||||
]
|
||||
|
||||
[tool.pip]
|
||||
@@ -101,8 +101,8 @@ pip install -e .
|
||||
```
|
||||
|
||||
> **Note:** If your project requires a specific devx version, pin it in
|
||||
> `dependencies` (for example, `"devx==0.41.0"`) or use a version constraint
|
||||
> (for example, `"devx>=0.41.0,<0.42"`).
|
||||
> `dependencies` (for example, `"devx==0.41.1"`) or use a version constraint
|
||||
> (for example, `"devx>=0.41.1,<0.42"`).
|
||||
|
||||
### Optional extras
|
||||
|
||||
|
||||
+8
-8
@@ -12,12 +12,12 @@ project to be reusable across all oblachno-oss repositories.
|
||||
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/src/branch/master/LICENSE)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/wiki)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/actions)
|
||||
[](https://git.oblachno.oblachno.fyi/oblachno-oss/devx/releases)
|
||||
[](https://www.python.org/downloads/)
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -74,14 +74,14 @@ Add devx to your `pyproject.toml` dependencies and configure the registry:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.41.0",
|
||||
"devx>=0.41.1",
|
||||
]
|
||||
|
||||
[tool.pip]
|
||||
extra-index-url = "https://git.oblachno.oblachno.fyi/api/packages/oblachno-oss/pypi/simple"
|
||||
```
|
||||
|
||||
Pin a specific version if needed: `"devx==0.41.0"` or `"devx>=0.41.0,<0.42"`.
|
||||
Pin a specific version if needed: `"devx==0.41.1"` or `"devx>=0.41.1,<0.42"`.
|
||||
|
||||
### Optional extras
|
||||
|
||||
|
||||
@@ -48,12 +48,12 @@ Add devx to your `pyproject.toml`:
|
||||
```toml
|
||||
[project]
|
||||
dependencies = [
|
||||
"devx>=0.41.0",
|
||||
"devx>=0.41.1",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = [
|
||||
"devx>=0.41.0",
|
||||
"devx>=0.41.1",
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
"""devx — reusable development and CI/CD tools for oblachno-oss projects."""
|
||||
|
||||
__version__ = "0.41.0"
|
||||
__version__ = "0.41.1"
|
||||
|
||||
@@ -385,7 +385,7 @@ devx-check-test-speed:
|
||||
# This is also automatically enforced by the pytest plugin (pytest11 entry point).
|
||||
# Use this target for CI gates or pre-commit hooks.
|
||||
devx-check-test-isolation:
|
||||
@$(DEVX_PYTHON) -m devx.tools.check_test_isolation --test-path $(DEVX_TEST_PATHS)
|
||||
@$(DEVX_PYTHON) -m devx.tools.check_test_isolation $(addprefix --test-path ,$(DEVX_TEST_PATHS))
|
||||
|
||||
# Check translation files for missing keys, dead keys, and missing languages.
|
||||
# Runs automatically as part of devx-lint to shift-left translation issues
|
||||
|
||||
@@ -449,10 +449,12 @@ def pytest_collection_finish(session): # type: ignore[no-untyped-def] # pragma
|
||||
@click.command()
|
||||
@click.option(
|
||||
"--test-path",
|
||||
"test_paths",
|
||||
type=click.Path(exists=True, path_type=Path),
|
||||
default=Path("tests/"),
|
||||
multiple=True,
|
||||
default=[Path("tests/")],
|
||||
show_default=True,
|
||||
help="Path to test directory or file to analyze.",
|
||||
help="Path to test directory or file to analyze (can be specified multiple times).",
|
||||
)
|
||||
@click.option(
|
||||
"--max-loop-iterations",
|
||||
@@ -474,31 +476,35 @@ def pytest_collection_finish(session): # type: ignore[no-untyped-def] # pragma
|
||||
help="Comma-separated list of categories to check (default: all). "
|
||||
"Available: unpatched-subprocess, unpatched-sleep, unpatched-helper, excessive-iterations",
|
||||
)
|
||||
def cli(test_path: Path, max_loop_iterations: int, strict: bool, categories: str) -> None:
|
||||
def cli(test_paths: tuple[Path, ...], max_loop_iterations: int, strict: bool, categories: str) -> None:
|
||||
"""Check test files for un-hermetic patterns that cause slow or flaky tests."""
|
||||
allowed: set[str] | None = None
|
||||
if categories:
|
||||
allowed = {c.strip() for c in categories.split(",")}
|
||||
|
||||
violations = analyze_test_files(test_path, max_loop_iterations, allowed)
|
||||
all_violations: list[Violation] = []
|
||||
total_files = 0
|
||||
for test_path in test_paths:
|
||||
violations = analyze_test_files(test_path, max_loop_iterations, allowed)
|
||||
all_violations.extend(violations)
|
||||
total_files += len(find_test_files(test_path))
|
||||
|
||||
if not violations:
|
||||
file_count = len(find_test_files(test_path))
|
||||
if not all_violations:
|
||||
click.echo(
|
||||
_("Test isolation check passed: {count} test files analyzed, no violations found.", count=file_count)
|
||||
_("Test isolation check passed: {count} test files analyzed, no violations found.", count=total_files)
|
||||
)
|
||||
sys.exit(0)
|
||||
|
||||
click.echo(
|
||||
_(
|
||||
"Test isolation check FAILED: {count} violation(s) found in {files} test file(s).",
|
||||
count=len(violations),
|
||||
files=len({v.file for v in violations}),
|
||||
count=len(all_violations),
|
||||
files=len({v.file for v in all_violations}),
|
||||
),
|
||||
err=True,
|
||||
)
|
||||
click.echo("")
|
||||
for v in sorted(violations, key=lambda x: (str(x.file), x.line)):
|
||||
for v in sorted(all_violations, key=lambda x: (str(x.file), x.line)):
|
||||
click.echo(f" {v.format()}", err=True)
|
||||
|
||||
click.echo("")
|
||||
|
||||
Reference in New Issue
Block a user