Skip to content

fixes

fixes #17

Workflow file for this run

# Runs the Abipy test suite.
name: Tests
on:
push:
branches: [develop]
pull_request:
branches: [develop]
workflow_dispatch:
workflow_call: # make this workflow reusable by release.yml
permissions:
contents: read
jobs:
test:
# prevent this action from running on forks
#if: github.repository == 'abinit/abipy'
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-latest
python: '3.11'
#python: '>3.9'
#extras: ci, optional
# pytest-split automatically distributes work load so parallel jobs finish in similar time
# update durations file with `pytest --store-durations --durations-path tests/files/.pytest-split-durations`
split: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
runs-on: ${{ matrix.config.os }}
#env:
# PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
steps:
- name: Check out Abipy repo
uses: actions/checkout@v4
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
- name: Installing abinit from conda-forge and abipy with python=${{ matrix.config.python }}
run: |
conda create -n abipy python=${{ matrix.config.python }} --yes
conda activate abipy
conda install abinit -c conda-forge --yes
mpirun -n 1 abinit --version
mpirun -n 1 abinit --build
pip install .
mkdir -p $HOME/.abinit/abipy/
cp abipy/data/managers/travis_manager.yml $HOME/.abinit/abipy/manager.yml
cp abipy/data/managers/simple_scheduler.yml $HOME/.abinit/abipy/scheduler.yml
- name: pytest split ${{ matrix.split }}
run: |
conda activate abipy
#abicheck.py --with-flow
pip install -r requirements-tests.txt
pytest --splits 10 --group ${{ matrix.split }} # --durations-path tests/files/.pytest-split-durations tests