diff --git a/.github/workflows/ci-pdm-install-and-test.yml b/.github/workflows/ci-pdm-install-and-test.yml index 308cc49b..69fc29d3 100644 --- a/.github/workflows/ci-pdm-install-and-test.yml +++ b/.github/workflows/ci-pdm-install-and-test.yml @@ -27,11 +27,6 @@ jobs: pdm run python -m pip install torch --index-url https://download.pytorch.org/whl/cpu # check that the CPU version is installed - - name: Print and check torch version - run: | - pdm run python -c "import torch; print(torch.__version__)" - pdm run python -c "import torch; assert torch.__version__.endswith('+cpu')" - - name: Install package (including dev dependencies) run: | pdm install diff --git a/.github/workflows/ci-pip-install-and-test-gpu.yml b/.github/workflows/ci-pip-install-and-test-gpu.yml index 2cc168f0..b05b2ecf 100644 --- a/.github/workflows/ci-pip-install-and-test-gpu.yml +++ b/.github/workflows/ci-pip-install-and-test-gpu.yml @@ -22,6 +22,11 @@ jobs: python -m pip install . python -m pip install pytest + - name: Print and check torch version + run: | + python -c "import torch; print(torch.__version__)" + python -c "import torch; assert not torch.__version__.endswith('+cpu')" + - name: Run tests run: | python -m pytest diff --git a/.github/workflows/ci-pip-install-and-test.yml b/.github/workflows/ci-pip-install-and-test.yml index 66ac95ac..b7d0afee 100644 --- a/.github/workflows/ci-pip-install-and-test.yml +++ b/.github/workflows/ci-pip-install-and-test.yml @@ -22,6 +22,11 @@ jobs: python -m pip install . python -m pip install pytest + - name: Print and check torch version + run: | + pdm run python -c "import torch; print(torch.__version__)" + pdm run python -c "import torch; assert torch.__version__.endswith('+cpu')" + - name: Run tests run: | python -m pytest