From 9b025c2631e213a0a4aa571234ff0bbda4c453cf Mon Sep 17 00:00:00 2001 From: belthlemar Date: Mon, 22 Jul 2024 15:55:50 +0200 Subject: [PATCH] add pytest ini --- .github/workflows/main.yml | 7 +++---- pytest.ini | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 pytest.ini diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ff2d3b..20ed319 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,15 +41,14 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements-dev.txt - - # Adapt the following code - name: Test with pytest run: | - pytest --cov antarest --cov-report xml + pytest --cov tests --cov-report xml - name: Fix code coverage paths if: matrix.os == 'ubuntu-20.04' + # Not sure what the `sed` is supposed to do run: | - sed -i 's/\/home\/runner\/work\/AntaREST\/AntaREST/\/github\/workspace/g' coverage.xml + sed -i 's/\/home\/runner\/work\/antares-study-version\/antares-study-version/\/github\/workspace/g' coverage.xml - name: Archive code coverage results if: matrix.os == 'ubuntu-20.04' uses: actions/upload-artifact@v4 diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..d0ef9a8 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,5 @@ +[pytest] +pythonpath = src +testpaths = tests +log_cli = true +junit_family=xunit2