Skip to content

Update canary script, automation #293

Update canary script, automation

Update canary script, automation #293

Workflow file for this run

name: Canary tests
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
name: Canary tests on ${{ matrix.cfg.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
cfg:
- os: ubuntu-latest
- os: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Find if any OFFXML files were added
shell: bash -l {0}
run: |
if [[ $(git diff origin/main HEAD --name-only | grep "\.offxml") ]]; then
echo "new_off_xml=true" >> $GITHUB_ENV
fi
echo $GITHUB_ENV
- name: Install conda environment
if: ${{ env.new_off_xml == 'true' }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/canary_env.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
if: ${{ env.new_off_xml == 'true' }}
shell: bash
run: |
uname -a
df -h
ulimit -a
- name: Install package
if: ${{ env.new_off_xml == 'true' }}
shell: bash -l {0}
run: |
conda remove --force openforcefields
python -m pip install -e .
- name: Run HMR canary tests
if: ${{ env.new_off_xml == 'true' }}
shell: bash -l {0}
run: |
git diff origin/main --name-only | grep "\.offxml" | python canary/scripts/test_hmr.py