-
Notifications
You must be signed in to change notification settings - Fork 7
57 lines (49 loc) · 1.57 KB
/
tests.yml
File metadata and controls
57 lines (49 loc) · 1.57 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
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Tests
on:
push:
branches: [master]
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
# Checkout repository
- name: Checkout source
uses: actions/checkout@v4
# Setup micromamba and Python environment
- name: Setup micromamba with test environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml # Make sure uv is included in this file OR:
environment-name: test-env
create-args: >-
uv
torch>=2.1.0,<2.6.0
init-shell: bash
generate-run-shell: true
# Install Python dependencies using uv
- name: Install Python dependencies with uv
shell: micromamba-shell bash
run: |
uv pip install -e '.[dev]'
# Set up environment variables for LAMMPS
- name: Configure LAMMPS paths
shell: micromamba-shell bash
run: |
echo "LAMMPS_POTENTIALS=$GITHUB_WORKSPACE/mcmc/potentials" >> $GITHUB_ENV
echo "LAMMPS_COMMAND=$(which lmp)" >> $GITHUB_ENV
echo "ASE_LAMMPSRUN_COMMAND=$(which lmp)" >> $GITHUB_ENV
# Display configured LAMMPS paths (for debugging)
- name: Print LAMMPS paths
shell: micromamba-shell bash
run: |
echo "LAMMPS_POTENTIALS = $LAMMPS_POTENTIALS"
echo "LAMMPS_COMMAND = $LAMMPS_COMMAND"
echo "ASE_LAMMPSRUN_COMMAND = $ASE_LAMMPSRUN_COMMAND"
# Run tests
- name: Run tests with pytest
shell: micromamba-shell bash
run: |
pytest --capture=no --cov --cov-report=xml