forked from materialsvirtuallab/matgenb
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.57 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Runs the complete test suite incl. many external command line dependencies (like Openbabel)
# as well as the pymatgen.ext package. Coverage used to be computed based on this workflow.
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
test:
defaults:
run:
shell: bash -l {0} # enables conda/mamba env activation by reading bash profile
strategy:
fail-fast: false
matrix:
# pytest-split automatically distributes work load so parallel jobs finish in similar time
os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
env:
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
PMG_VASP_PSP_DIR: /home/runner/work/matgenb/matgenb/psp
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up micromamba
uses: mamba-org/setup-micromamba@main
- name: Create mamba environment
run: |
micromamba create -n venv python=${{ matrix.python-version }} --yes
micromamba install -n venv -c conda-forge enumlib packmol bader openbabel openff-toolkit --yes
- name: Install uv
run: micromamba run -n venv pip install uv
- name: Install dependencies
run: |
micromamba activate venv
uv pip install numpy cython
uv pip install --upgrade -r requirements-ci.txt
- name: pytest
run: |
micromamba activate venv
cd notebooks
pwd
pytest --ignore-glob=*notest.ipynb --nbmake .