Update environment.yml to include Python 3.11 #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |