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