diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b90bb74cb..c089675614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,12 +136,15 @@ jobs: steps: - uses: actions/checkout@v4 + - run: pipx install poetry==2.0.0 + - uses: actions/setup-python@v5 with: python-version: "3.10" + cache: "poetry" - name: Install dependencies - run: python -m pip install --upgrade coverage[toml] + run: poetry install --only dev - name: Download data uses: actions/download-artifact@v4 @@ -155,7 +158,7 @@ jobs: # We added this step to replace the variable `MERGE_COVERAGE_FILES: true` # in the next step, which had started to raise errors # (https://github.com/fractal-analytics-platform/fractal-server/pull/1725). - run: coverage combine coverage-data-* + run: poetry run coverage combine coverage-data-* - name: Add coverage comment to Pull Requests id: coverage_comment diff --git a/CHANGELOG.md b/CHANGELOG.md index e2bb565c42..7e4d3531fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ * App: * Add missing space in "To" field for email settings (\#2173). +* Testing: + * Improve configuration for coverage GitHub Action step (\#2175). # 2.10.4 diff --git a/pyproject.toml b/pyproject.toml index a6718cc30c..5c490599e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -114,7 +114,10 @@ push = true branch = true parallel = true relative_files = true -omit = ["tests/*", "benchmarks/*", "fractal_server/json_schemas/*"] +omit = ["tests/*", "benchmarks/*", "fractal_server/json_schemas/*", "*/.venv/*"] + +[tool.coverage.report] +omit = ["tests/*", "benchmarks/*", "fractal_server/json_schemas/*", "*/.venv/*"] [tool.mypy.overrides] module = ["devtools", "uvicorn", "pytest", "asgi_lifespan", "asyncpg"]