From 5caf2fa0d527e56abba55d2bb7dd617b15b1a9de Mon Sep 17 00:00:00 2001 From: Sylvain Leclerc Date: Wed, 21 Aug 2024 09:27:23 +0200 Subject: [PATCH] build: use relative paths in coverage report This allows to remove an unnecessary trick from CI. Signed-off-by: Sylvain Leclerc --- .github/workflows/main.yml | 4 ---- pyproject.toml | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4b1038ddcd..5a7b9ad212 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -54,10 +54,6 @@ jobs: - name: Test with pytest run: | pytest --cov antarest --cov-report xml - - name: Fix code coverage paths - if: matrix.os == 'ubuntu-20.04' - run: | - sed -i 's/\/home\/runner\/work\/AntaREST\/AntaREST/\/github\/workspace/g' coverage.xml - name: Archive code coverage results if: matrix.os == 'ubuntu-20.04' uses: actions/upload-artifact@v4 diff --git a/pyproject.toml b/pyproject.toml index 7031fea678..1d01065859 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,7 +35,7 @@ platforms = [ [tool.setuptools.packages.find] where = ["."] -include = ["antarest*"] # alternatively: `exclude = ["additional*"]` +include = ["antarest*"] [tool.mypy] strict = true @@ -72,6 +72,7 @@ exclude = "(antares-?launcher/*|alembic/*)" [tool.coverage.run] omit = ["antarest/tools/cli.py", "antarest/tools/admin.py"] +relative_files = true # avoids absolute path issues in CI [tool.isort] profile = "black"