Skip to content

swap to abstractobservables #140

swap to abstractobservables

swap to abstractobservables #140

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.9"
mpi: ""
#doctest: true
- os: macos-latest
python-version: "3.11"
mpi: "mpich"
env:
MPICH_INTERFACE_HOSTNAME: localhost
USE_MPI: ${{ matrix.mpi }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
if: matrix.mpi != ''
with:
mpi: ${{ matrix.mpi }}
- name: Pip install packages
if: ${{ ! matrix.oldest_deps }}
run: |
if [ -z "${{ matrix.mpi }}" ]; then
pip install 'netket' 'jax[cpu]'
else
pip install 'netket[mpi]' 'jax[cpu]'
fi
pip install -e '.[dev]'
- name: Run tests
run: |
export NETKET_EXPERIMENTAL=1
pytest --cov=netket_fidelity --cov-append test
- name: Run docstring tests
if: ${{ matrix.doctest }}
run: |
pytest --doctest-continue-on-failure --doctest-modules netket_fidelity/
- name: Run MPI tests
if: matrix.mpi != ''
run: |
mpirun -host localhost:2 -np 2 coverage run -m pytest test
coverage combine --append
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}