Skip to content

CI

CI #880

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
test:
name: ${{ matrix.os }} python=${{ matrix.python-version }} pydantic=${{ matrix.pydantic-version }} OE=${{ matrix.openeye }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: ["3.9", "3.10", "3.11"]
pydantic-version: ["1", "2"]
openeye: [false, true]
exclude:
- pydantic-version: "1"
python-version: "3.9"
- pydantic-version: "1"
python-version: "3.10"
- pydantic-version: "1"
openeye: false
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
steps:
- uses: actions/checkout@v4
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
- name: Install OpenEye
if: matrix.openeye
shell: bash -l {0}
run: |
micromamba install --yes -c openeye openeye-toolkits
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 -m pip install -e .
- 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-report=xml --color=yes openff/fragmenter/tests/ -nauto
- name: CodeCov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}