From 8b83abdb3993bb557ec82f24fd7680ca075dcf25 Mon Sep 17 00:00:00 2001 From: Alvin Noe Ladines Date: Tue, 20 Feb 2024 15:34:19 +0100 Subject: [PATCH] Change test action --- .github/workflows/actions.yaml | 4 +--- pyproject.toml | 4 ++++ tests/test_runschema.py | 8 ++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/actions.yaml b/.github/workflows/actions.yaml index 3f1a268..949901d 100644 --- a/.github/workflows/actions.yaml +++ b/.github/workflows/actions.yaml @@ -13,14 +13,12 @@ jobs: run: | pip install --upgrade pip pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple - : # we need the latest nomad version for testing - pip install --ignore-installed nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop + pip install --ignore-installed '.[tests]' pip install coverage coveralls - name: mypy run: | python -m mypy --ignore-missing-imports --follow-imports=silent --no-strict-optional runschema tests - name: Test with pytest - continue-on-error: true run: | python -m coverage run -m pytest -sv tests - name: Submit to coveralls diff --git a/pyproject.toml b/pyproject.toml index a6c1e7b..8becd64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,10 @@ dev = [ "pytest-cov==2.7.1", "ruff==0.1.4" ] +tests = [ + # we need the latest nomad version for testing + "nomad-lab[infrastructure]@git+https://github.com/nomad-coe/nomad.git@develop" +] [tool.ruff] include = ["runschema/*.py", "tests/*.py"] diff --git a/tests/test_runschema.py b/tests/test_runschema.py index f23fed3..a0a9b29 100644 --- a/tests/test_runschema.py +++ b/tests/test_runschema.py @@ -16,10 +16,10 @@ # See the License for the specific language governing permissions and # limitations under the License. # -from ..runschema.run import Run -from ..runschema.calculation import Calculation -from ..runschema.method import Method -from ..runschema.system import System +from runschema.run import Run +from runschema.calculation import Calculation +from runschema.method import Method +from runschema.system import System def test_schema():