From 435fc76dc16437edcce6365081fcfa782ad116d0 Mon Sep 17 00:00:00 2001 From: Harsh Sinha Date: Fri, 9 Feb 2024 14:46:54 -0500 Subject: [PATCH] Modify CI GitHub Action 1) Modify working directory so that pytest uses installed version of the library (in site-packages), and not that of Github repository 2) Include tests in pyproject.toml Related to https://github.com/Open-Minds-Lab/MRdataset/issues/29 --- .github/workflows/continuous-integration.yml | 6 ++++-- pyproject.toml | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7a06ecb..a89d335 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -37,8 +37,9 @@ jobs: run: | make lint - name: Test with pytest + working-directory: ${{ runner.temp }} run: | - pytest + pytest --pyargs MRdataset py312: runs-on: ${{ matrix.os }} @@ -66,5 +67,6 @@ jobs: run: | make lint - name: Test with pytest + working-directory: ${{ runner.temp }} run: | - pytest + pytest --pyargs MRdataset diff --git a/pyproject.toml b/pyproject.toml index 50f2622..c118cbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,9 +43,10 @@ Documentation = "https://open-minds-lab.github.io/MRdataset/" include = [ "MRdataset/*.py", "MRdataset/resources/*", + "MRdataset/tests/*", + "MRdataset/tests/resources/*", ] exclude = [ - "MRdataset/tests/*", ] [tool.hatch.version]