Skip to content

Commit 25333bd

Browse files
janoshesoteric-ephemera
authored andcommitted
CI add repository_dispatch event for pymatgen_ci_trigger (materialsproject#835)
* CI add repository_dispatch event for pymatgen_ci_trigger in which case pmg is installed from the POSTed commit SHA (usually master) * param-case event type to pymatgen-ci-trigger
1 parent 737a1e4 commit 25333bd

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/testing.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
tags: ["v*"]
77
pull_request:
88
workflow_dispatch:
9+
repository_dispatch:
10+
types: [pymatgen-ci-trigger]
911

1012
jobs:
1113
lint:
@@ -65,6 +67,10 @@ jobs:
6567
pip install torch-runstats
6668
pip install --no-deps nequip==0.5.6
6769
70+
- name: Install pymatgen from master if triggered by pymatgen repo dispatch
71+
if: github.event_name == 'repository_dispatch' && github.event.action == 'pymatgen-ci-trigger'
72+
run: pip install --upgrade 'git+https://github.com/materialsproject/pymatgen@${{ github.event.client_payload.pymatgen_ref }}'
73+
6874
- name: Test
6975
env:
7076
MP_API_KEY: ${{ secrets.MP_API_KEY }}

tests/forcefields/test_md.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
}
3232

3333

34-
@pytest.mark.parametrize("ff_name", ["CHGNet", "M3GNet", "MACE", "GAP", "Nequip"])
34+
@pytest.mark.parametrize(
35+
"ff_name",
36+
["CHGNet", "M3GNet", "MACE", "GAP", "Nequip"],
37+
)
3538
def test_ml_ff_md_maker(ff_name, si_structure, sr_ti_o3_structure, test_dir, clean_dir):
3639
n_steps = 5
3740

0 commit comments

Comments
 (0)