diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml index 76720a9..56dd404 100644 --- a/.github/workflows/_checks.yml +++ b/.github/workflows/_checks.yml @@ -42,12 +42,13 @@ jobs: --health-retries 5 steps: - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 - uses: astral-sh/setup-uv@v8.2.0 - run: uv python install ${{ matrix.python-version }} - run: uv python pin ${{ matrix.python-version }} - run: | uv sync --all-extras --no-install-project - uv run --no-sync pytest . --cov=. --cov-report xml + just test-ci env: PYTHONDONTWRITEBYTECODE: 1 PYTHONUNBUFFERED: 1 diff --git a/justfile b/justfile index 73af363..0c8a3d5 100644 --- a/justfile +++ b/justfile @@ -9,6 +9,12 @@ sh: test *args: down && down docker compose run application uv run --no-sync pytest {{ args }} +test-ci: + uv run --no-sync pytest --cov=. --cov-report term-missing --cov-report xml + +test-branch: + @just test --cov=. --cov-branch + build: docker compose build application diff --git a/pyproject.toml b/pyproject.toml index e2e879b..c53abe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ isort.no-lines-before = ["standard-library", "local-folder"] "tests/**" = ["S101"] [tool.pytest.ini_options] -addopts = "--cov=. --cov-report term-missing --cov-fail-under=100" +addopts = "" asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" @@ -88,6 +88,7 @@ asyncio_default_fixture_loop_scope = "function" concurrency = ["thread", "greenlet"] [tool.coverage.report] +fail_under = 100 exclude_also = [ "if typing.TYPE_CHECKING:", ]