diff --git a/.github/workflows/test_release_conda.yml b/.github/workflows/test_release_conda.yml index 97a3d6a97..136d91f51 100644 --- a/.github/workflows/test_release_conda.yml +++ b/.github/workflows/test_release_conda.yml @@ -36,17 +36,10 @@ jobs: shell: bash -el {0} env: EUPHONIC_VERSION: ${{ inputs.version }} - EXTRA_PACKAGES: matplotlib-base pyyaml h5py - TESTING_PACKAGES: pytest=7.* coverage pytest-mock pytest-lazy-fixture pytest-xvfb python-slugify run: | - conda install -c conda-forge euphonic=$EUPHONIC_VERSION $EXTRA_PACKAGES $TESTING_PACKAGES - - # - name: Update pip and install testing dependencies - # shell: bash -l {0} - # run: | - # python -m pip install --upgrade pip - # python -m pip install -r tests_and_analysis/ci_requirements.txt + conda env update --file build_utils/conda_release_test_requirements.yml + conda install -c conda-forge euphonic=$EUPHONIC_VERSION - name: Run tests shell: bash -el {0} diff --git a/build_utils/conda_release_test_requirements.yml b/build_utils/conda_release_test_requirements.yml new file mode 100644 index 000000000..89831fed4 --- /dev/null +++ b/build_utils/conda_release_test_requirements.yml @@ -0,0 +1,13 @@ +name: conda-release-test +channels: + - conda-forge +dependencies: + - pytest=7.* + - coverage + - pytest-mock + - pytest-lazy-fixture + - pytest-xvfb + - python-slugify + - matplotlib-base + - pyyaml + - h5py diff --git a/build_utils/conda_release_tox.ini b/build_utils/conda_release_tox.ini deleted file mode 100644 index feefb17bf..000000000 --- a/build_utils/conda_release_tox.ini +++ /dev/null @@ -1,50 +0,0 @@ -[tox] -# Use conda to set up the python environments to run in -requires = tox>=4 -# The python environments to run the tests in -envlist = py310-old-np,py310,py311,py312 -skip_install = True - -[testenv] -changedir = tests_and_analysis/test -test_command = python {toxinidir}/../tests_and_analysis/test/run_tests.py --report -requirements_dir = {toxinidir}/../tests_and_analysis -passenv = - EUPHONIC_VERSION -# The name "extras" is reserved and has its own format with newlines: -# we need a token to inject into custom commands_pre, so call it extras_str -extras_str = [test,matplotlib,phonopy-reader,brille] - -[testenv:{py310,py311,py312}] -whitelist_externals = conda -install_command = conda install {packages} -conda_channels = - conda-forge - default -extras = - test - matplotlib - phonopy-reader - -commands_pre = - conda install -c conda-forge euphonic={env:EUPHONIC_VERSION} -# Brille not available on conda -commands = {[testenv]test_command} -m "not brille" - -# Test against a version of Numpy less than the latest for Conda -# See https://github.com/conda-forge/euphonic-feedstock/pull/20 -[testenv:py310-old-np] -whitelist_externals = conda -install_command = conda install {packages} -conda_channels = - conda-forge - default -deps = numpy==1.24 -extras = - test - matplotlib - phonopy-reader -commands_pre = - conda install -c conda-forge euphonic={env:EUPHONIC_VERSION} -# Brille not available on conda -commands = {[testenv]test_command} -m "not brille"