diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3f39277ab..bb51c0ae7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -157,7 +157,7 @@ jobs: - name: Install project run: | - python -m pip install . + python -m pip install .[test] python -m pip freeze - name: Test Pyccel optimization flags @@ -174,7 +174,13 @@ jobs: run: | export PSYDAC_MESH_DIR=$GITHUB_WORKSPACE/mesh export OMP_NUM_THREADS=2 - python -m pytest -n auto --cov psydac.api --pyargs psydac -m "not parallel and not petsc" + python -m pytest -n auto --cov psydac --cov-report xml:coverage.xml --pyargs psydac -m "not parallel and not petsc" + + - name: Run Codacy coverage reporter + uses: codacy/codacy-coverage-reporter-action@v1.3.0 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: coverage.xml - name: Run MPI tests with Pytest working-directory: ./pytest @@ -197,12 +203,6 @@ jobs: export OMP_NUM_THREADS=2 python mpi_tester.py --mpirun="mpiexec -n 4 ${MPI_OPTS}" --pyargs psydac -m "parallel and petsc" - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: kvrigor/psydac - - name: Remove test directory if: ${{ always() }} run: | diff --git a/pyproject.toml b/pyproject.toml index 05d7a5a23..364d2c0ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,11 @@ dependencies = [ 'igakit @ https://github.com/dalcinl/igakit/archive/refs/heads/master.zip' ] +[project.optional-dependencies] +test = [ + "pytest-cov >= 5.0.0", +] + [project.urls] Homepage = "https://github.com/pyccel/psydac" Documentation = "https://pyccel.github.io/psydac"