Skip to content

Commit 81f5841

Browse files
janoshhrushikesh-s
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 a019641 commit 81f5841

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
@@ -29,7 +29,10 @@
2929
}
3030

3131

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

0 commit comments

Comments
 (0)