Repository navigation
44 lines (40 loc) · 1.35 KB
/
Copy pathtest.yml
File metadata and controls
44 lines (40 loc) · 1.35 KB
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
name: Test
on:
push:
branches: [main]
paths-ignore: ["**/*.md", "docs/**", "dev_scripts/**"]
pull_request:
branches: [main]
paths-ignore: ["**/*.md", "docs/**", "dev_scripts/**"]
workflow_dispatch:
inputs:
task:
type: choice
options: [test]
default: test
description: Trigger test manually.
workflow_call: # make this workflow reusable by release.yml
jobs:
test:
runs-on: ubuntu-latest
container:
# MAVRL's docker container build on uv with LAMMPS with ML-GNNP and ML-SNAP.
# Required for testing the LAMMPS related methods.
image: docker.io/materialsvirtuallab/lammps_gnnp
env:
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION: python
PMG_MAPI_KEY: ${{ secrets.PMG_MAPI_KEY }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pip install dgl==2.4.0 -f https://data.dgl.ai/wheels/torch-2.4/repo.html
pip install -e '.[ci]'
apt-get update
apt-get install -y curl # Curl is not part of the minimal container image, but is required for CodeCov upload.
- name: pytest
run: pytest --cov=matcalc --cov-report=xml tests --color=yes
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}