Skip to content

Add support for configurable HORTON partitioning options #26

Add support for configurable HORTON partitioning options

Add support for configurable HORTON partitioning options #26

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0} # needed so conda is activated in every step
jobs:
lint:
name: Lint (ruff)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install ruff
run: pip install ruff
- name: Run ruff
run: ruff check .
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up conda (miniforge)
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: ${{ matrix.python-version }}
activate-environment: pyxdm
environment-file: environment.yaml
auto-activate-base: false
- name: Fix libint2 soname (horton compiled against libint2.so.2 / libint2.2.dylib)
run: |
if [ -f "$CONDA_PREFIX/lib/libint2.so" ] && [ ! -f "$CONDA_PREFIX/lib/libint2.so.2" ]; then
ln -sf "$CONDA_PREFIX/lib/libint2.so" "$CONDA_PREFIX/lib/libint2.so.2"
fi
if [ -f "$CONDA_PREFIX/lib/libint2.dylib" ] && [ ! -f "$CONDA_PREFIX/lib/libint2.2.dylib" ]; then
ln -sf "$CONDA_PREFIX/lib/libint2.dylib" "$CONDA_PREFIX/lib/libint2.2.dylib"
fi
- name: Install package + test dependencies
run: pip install -e ".[test]"
- name: Run tests with coverage
run: pytest
- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@v4
with:
files: coverage.xml
fail_ci_if_error: false