Skip to content

Commit

Permalink
Add a CI run that only tests non-optional deps (optimistically)
Browse files Browse the repository at this point in the history
- Hopefully all tests have been written in such a way that they will be
  skipped if the underlying required package is not found
  • Loading branch information
ml-evs committed Apr 23, 2024
1 parent 1367746 commit 783ba88
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,38 @@ jobs:
run: |
sudo cp cmd_line/gulp/Linux_64bit/* /usr/local/bin/
- name: Install pymatgen and mandatory testing dependencies only
run: |
micromamba activate pmg
uv pip install -e '.[dev]'
- name: pytest split ${{ matrix.split }}
run: |
micromamba activate pmg
pytest --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests
- name: Install ubuntu-only conda dependencies
if: matrix.os == 'ubuntu-latest'
run: |
micromamba install -n pmg -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes
- name: Install pymatgen and dependencies
- name: Install all optional dependencies with workarounds
run: |
micromamba activate pmg
# TODO remove temporary fix. added since uv install torch is flaky.
# track https://github.com/astral-sh/uv/issues/1921 for resolution
pip install torch
micromamba activate pmg
uv pip install numpy cython
# TODO remove temporary fix. added since uv install torch is flaky.
# track https://github.com/astral-sh/uv/issues/1921 for resolution
pip install torch
uv pip install --editable '.[dev,optional]'
uv pip install numpy cython
# TODO remove next line installing ase from main branch when FrechetCellFilter is released
uv pip install --upgrade 'git+https://gitlab.com/ase/ase'
uv pip install --editable '.[dev,optional]'
- name: pytest split ${{ matrix.split }}
# TODO remove next line installing ase from main branch when FrechetCellFilter is released
uv pip install --upgrade 'git+https://gitlab.com/ase/ase'
- name: Optional deps - pytest split ${{ matrix.split }}
run: |
micromamba activate pmg
pytest --splits 10 --group ${{ matrix.split }} --durations-path tests/files/.pytest-split-durations tests

0 comments on commit 783ba88

Please sign in to comment.