Skip to content

Commit

Permalink
build: use relative paths in coverage report (#2125)
Browse files Browse the repository at this point in the history
This allows to remove an unnecessary trick from CI, which could break if
anything change on github side.

Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl authored Aug 21, 2024
1 parent 8c0b09e commit 9f739e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ platforms = [

[tool.setuptools.packages.find]
where = ["."]
include = ["antarest*"] # alternatively: `exclude = ["additional*"]`
include = ["antarest*"]

[tool.mypy]
strict = true
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 9f739e1

Please sign in to comment.