Merge pull request #82 from openforcefield/revert-81-dependabot/githu… #177
This file contains 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: 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.9" | |
- "3.10" | |
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/master 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: Environment Information | |
if: ${{ env.new_off_xml == 'true' }} | |
shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
- 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/master --name-only | grep "\.offxml" | python canary/scripts/test_hmr.py |