Skip to content

CI

CI #1811

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: ${{ matrix.os }}, 🐍=${{ matrix.python-version }}, 👁️=${{ matrix.openeye }}, ∫=${{ matrix.integration }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: [3.9]
openeye: [true, false]
integration: [true]
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v4
- name: Install with OpenEye Toolkits
if: ${{ matrix.openeye == true }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test-env.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install with AmberTools
if: ${{ matrix.openeye == false }}
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/no_openeye.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: License OpenEye
shell: bash -l {0}
if: ${{ matrix.openeye == true }}
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Install Package
shell: bash -l {0}
run: |
python setup.py develop --no-deps
- name: Conda Environment Information
shell: bash -l {0}
run: |
conda info
conda list
- name: Run Tests
shell: bash -l {0}
run: |
pytest -v --cov=openff --cov-config=setup.cfg openff/bespokefit/tests --cov-report=xml
- name: Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
fail_ci_if_error: false
- name: Run Integration Tests
if: ${{ matrix.integration == true }}
shell: bash -l {0}
run: |
openff-bespoke executor run --smiles 'CC' \
--workflow 'default' \
--default-qc-spec xtb gfn2xtb none \
--target-torsion '[C:1]-[C:2]'